Re: [SQL] Serials.

2001-03-25 Thread Grant
> Grant writes: > > I have a message board. Where users can send each other messages. I > > doubt I will ever get 2147483647 messages, but I want to make sure I > > never get an error where the message isn't sent. > > Think about loads. If your users are going to be posting 10 > messages/second,

Re: [SQL] Serials.

2001-03-24 Thread Dan Lyke
Grant writes: > I have a message board. Where users can send each other messages. I > doubt I will ever get 2147483647 messages, but I want to make sure I > never get an error where the message isn't sent. Think about loads. If your users are going to be posting 10 messages/second, that's 864000

Re: [SQL] Serials.

2001-03-24 Thread Grant
> > (1) Why is a sequence limited to 2147483647, it seems very small? > > Yikes! What are you counting? :-) I have a message board. Where users can send each other messages. I doubt I will ever get 2147483647 messages, but I want to make sure I never get an error where the message isn't sent.

Re: [SQL] Serials.

2001-03-24 Thread Peter Eisentraut
Grant writes: > (1) Why is a sequence limited to 2147483647, it seems very small? Because that's what a four-byte signed integer takes. No one has stepped forward to implement 8-byte sequence counters, yet. > (2) If I reset the sequence, then try another insert. It will not insert > anything u

Re: [SQL] Serials.

2001-03-24 Thread Mathijs Brands
On Sat, Mar 24, 2001 at 03:55:09PM +1000, Grant allegedly wrote: > Please see below for my table schema. I have two questions. > > (1) Why is a sequence limited to 2147483647, it seems very small? This is the maximum value a signed integer (32-bit) can contain. If this really is a problem for yo

Re: [SQL] Serials.

2001-03-24 Thread Richard Huxton
Grant wrote: > > Please see below for my table schema. I have two questions. > > (1) Why is a sequence limited to 2147483647, it seems very small? That's 2 billion(ish) - the largest signed 32 bit integer. > (2) If I reset the sequence, then try another insert. It will not insert > anything u

Re: [SQL] Serials.

2001-03-24 Thread D'Arcy J.M. Cain
Thus spake Grant > Please see below for my table schema. I have two questions. > > (1) Why is a sequence limited to 2147483647, it seems very small? Yikes! What are you counting? :-) The value 2147483647 is the largest value that can fit into an int. It is equal to 0x7fff in hex. If you

[SQL] Serials.

2001-03-23 Thread Grant
Please see below for my table schema. I have two questions. (1) Why is a sequence limited to 2147483647, it seems very small? (2) If I reset the sequence, then try another insert. It will not insert anything until it cycles through all sequences and finds an unused one. It will give the followin

Re: [SQL] Serials

2001-01-14 Thread Thomas Swan
At 1/12/2001 10:35 AM, Josh Berkus wrote: >Mr. Naik, > > > What's the purpose of Serials in Data types of postgres ? > > TIA > > Sharmad SERIAL is the same as makeing a column and then setting the default value to a sequence. If you insert and don't specify the column that is of type serial it w

Re: [SQL] Serials

2001-01-12 Thread Josh Berkus
Mr. Naik, > What's the purpose of Serials in Data types of postgres ? > TIA > Sharmad This topic is more than adequately covered in both the online documentation and Bruce Momjian's book. If language or other problems are preventing you from finding the correct reference, please reply and I'll

[SQL] Serials

2001-01-12 Thread Sharmad Naik
What's the purpose of Serials in Data types of postgres ? TIA Sharmad