ROWID....

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ROWID....

Luuk

In the docs (https://www.sqlite.org/autoinc.html) it says:
In SQLite, table rows normally have a 64-bit signed integer ROWID
<https://www.sqlite.org/lang_createtable.html#rowid> ....

Question:
Why it this a signed integer, and not an unsigned integer?

Simply by choice? of is there something more to say about this?


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: ROWID....

Kevin Benson
On Sat, Jun 9, 2018 at 7:03 AM Luuk <[hidden email]> wrote:

>
> In the docs (https://www.sqlite.org/autoinc.html) it says:
> In SQLite, table rows normally have a 64-bit signed integer ROWID
> <https://www.sqlite.org/lang_createtable.html#rowid> ....
>
> Question:
> Why it this a signed integer, and not an unsigned integer?
>
> Simply by choice? of is there something more to say about this?
>

http://sqlite.1065341.n5.nabble.com/Use-of-AUTOINCREMENT-td74775.html#a74786
--
   --
      --
         --Ö¿Ö--
        K e V i N
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: ROWID....

Paul Sanderson
As ROWID is often an alias for an integer primary key then it  needs to be
able to represent both negaitive and positive integers other wise you
restrict the range of an integer PK.



Paul
www.sandersonforensics.com
SQLite Forensics Book <https://www.amazon.co.uk/dp/ASIN/1980293074>

On 9 June 2018 at 13:03, Kevin Benson <[hidden email]> wrote:

> On Sat, Jun 9, 2018 at 7:03 AM Luuk <[hidden email]> wrote:
>
> >
> > In the docs (https://www.sqlite.org/autoinc.html) it says:
> > In SQLite, table rows normally have a 64-bit signed integer ROWID
> > <https://www.sqlite.org/lang_createtable.html#rowid> ....
> >
> > Question:
> > Why it this a signed integer, and not an unsigned integer?
> >
> > Simply by choice? of is there something more to say about this?
> >
>
> http://sqlite.1065341.n5.nabble.com/Use-of-AUTOINCREMENT-td74775.html#
> a74786
> --
>    --
>       --
>          --Ö¿Ö--
>         K e V i N
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: ROWID....

Keith Medcalf
In reply to this post by Luuk

SQLite does not have unsigned integers.  All integers are 64-bit signed entities, but may be stored in shorter integers on disk if the value fits.  This is an internal optimization and not visible externally.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>[hidden email]] On Behalf Of Luuk
>Sent: Saturday, 9 June, 2018 05:04
>To: SQLite mailing list
>Subject: [sqlite] ROWID....
>
>
>In the docs (https://www.sqlite.org/autoinc.html) it says:
>In SQLite, table rows normally have a 64-bit signed integer ROWID
><https://www.sqlite.org/lang_createtable.html#rowid> ....
>
>Question:
>Why it this a signed integer, and not an unsigned integer?
>
>Simply by choice? of is there something more to say about this?
>
>
>_______________________________________________
>sqlite-users mailing list
>[hidden email]
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users