Re: [sqlite] Integer data type

2013-07-19 Thread Igor Tandetnik
On 7/19/2013 8:29 AM, Paolo Bolzoni wrote: Interesting problem, can you add a new comparison operator to sqlite3? Yes, but only for strings, not for ints. http://sqlite.org/c3ref/create_collation.html -- Igor Tandetnik ___ sqlite-users mailing

Re: [sqlite] Integer data type

2013-07-19 Thread Paolo Bolzoni
Or just use a BLOB. On Fri, Jul 19, 2013 at 2:29 PM, Simon Slavin wrote: > > On 19 Jul 2013, at 1:20pm, Paolo Bolzoni > wrote: > >> True, I was thinking as follow up of what I >> mentioned in the first message. >> -11 is the result of the

Re: [sqlite] Integer data type

2013-07-19 Thread Simon Slavin
On 19 Jul 2013, at 1:20pm, Paolo Bolzoni wrote: > True, I was thinking as follow up of what I > mentioned in the first message. > -11 is the result of the cast of 4294967285 > from unsigned int to int in a machine > where int are 32 bits long. Then don't cast.

Re: [sqlite] Integer data type

2013-07-19 Thread Paolo Bolzoni
gt; Gesendet: Freitag, 19. Juli 2013 14:11 > An: General Discussion of SQLite Database > Betreff: Re: [sqlite] Integer data type > > After all do you really care if the unsigned int 4294967285 is stored as -11? > > On Fri, Jul 19, 2013 at 1:13 PM, Simon Slavin <slav...@bigfraud.or

Re: [sqlite] Integer data type

2013-07-19 Thread Paolo Bolzoni
True, I was thinking as follow up of what I mentioned in the first message. -11 is the result of the cast of 4294967285 from unsigned int to int in a machine where int are 32 bits long. On Fri, Jul 19, 2013 at 2:16 PM, Richard Hipp wrote: > On Fri, Jul 19, 2013 at 8:11 AM,

Re: [sqlite] Integer data type

2013-07-19 Thread Hick Gunter
It might change the sort order... -Ursprüngliche Nachricht- Von: Paolo Bolzoni [mailto:paolo.bolzoni.br...@gmail.com] Gesendet: Freitag, 19. Juli 2013 14:11 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Integer data type After all do you really care if the unsigned int

Re: [sqlite] Integer data type

2013-07-19 Thread Richard Hipp
On Fri, Jul 19, 2013 at 8:11 AM, Paolo Bolzoni < paolo.bolzoni.br...@gmail.com> wrote: > After all do you really care if the unsigned > int 4294967285 is stored as -11? > To be pedantic: SQLite stores 4294967285 as 4294967285. It is 18446744073709551605 that gets stored as -11. -- D. Richard

Re: [sqlite] Integer data type

2013-07-19 Thread Paolo Bolzoni
After all do you really care if the unsigned int 4294967285 is stored as -11? On Fri, Jul 19, 2013 at 1:13 PM, Simon Slavin wrote: > > On 19 Jul 2013, at 11:02am, techi eth wrote: > >> Definition of integer data type will talk for signed integer. What

Re: [sqlite] Integer data type

2013-07-19 Thread Simon Slavin
On 19 Jul 2013, at 11:02am, techi eth wrote: > Definition of integer data type will talk for signed integer. What about > unsigned integer ?Are they also be part of same data type. Yes. SQLite has no special type for an unsigned integer. Just store them as integers. The

Re: [sqlite] Integer data type

2013-07-19 Thread Paolo Bolzoni
As far as I know there is no unsigned integer in sqlite3. If you need cast to a signed integer of the same size before using sqlite3. On Fri, Jul 19, 2013 at 12:02 PM, techi eth wrote: > Definition of integer data type will talk for signed integer. What about > unsigned

[sqlite] Integer data type

2013-07-19 Thread techi eth
Definition of integer data type will talk for signed integer. What about unsigned integer ?Are they also be part of same data type. *INTEGER*. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value. http://www.sqlite.org/datatype3.html Bye

Re: [sqlite] INTEGER data type

2005-07-08 Thread Kiel W.
> That's correct for version 2.8. Version 3.0 expands the INTEGER PRIMARY > KEY out to 64 bits so you have a range of -18446744073709551616 to > +18446744073709551615. Seems unlikely to overflow... > -- > D. Richard Hipp <[EMAIL PROTECTED]> Thanks for the correction. Definately plenty of space

Re: [sqlite] INTEGER data type

2005-07-06 Thread D. Richard Hipp
On Wed, 2005-07-06 at 17:49 -0400, Kiel W. wrote: > On 7/4/05, Ajay <[EMAIL PROTECTED]> wrote: > > > > Hello All, > > > > What is the maximum number that can be stored using INTEGER data type? My > > table uses INTEGER to store primary key, I store lot of records in table. > > I > > suspect

Re: [sqlite] INTEGER data type

2005-07-06 Thread Kiel W.
On 7/4/05, Ajay <[EMAIL PROTECTED]> wrote: > > Hello All, > > What is the maximum number that can be stored using INTEGER data type? My > table uses INTEGER to store primary key, I store lot of records in table. > I > suspect that primary key will run out of limit. How can I use long instead >

[sqlite] INTEGER data type

2005-07-04 Thread Ajay
Hello All, What is the maximum number that can be stored using INTEGER data type? My table uses INTEGER to store primary key, I store lot of records in table. I suspect that primary key will run out of limit. How can I use long instead of INTEGER? Regards, Ajay Sonawane