Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-26 Thread Peter Gulutzan
[EMAIL PROTECTED] ("scott.marlowe") wrote in message news:<[EMAIL PROTECTED]>... > On 21 Nov 2002, Rod Taylor wrote: > > > On Thu, 2002-11-21 at 15:09, scott.marlowe wrote: > > > On 21 Nov 2002, Rod Taylor wrote: > > > > > > > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > > > > Of course

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread scott.marlowe
On 21 Nov 2002, Rod Taylor wrote: > On Thu, 2002-11-21 at 15:09, scott.marlowe wrote: > > On 21 Nov 2002, Rod Taylor wrote: > > > > > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > > > Of course, those would be SQL purists who _don't_ understand > > > > concurrency issues. ;-) > > > > >

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread Rod Taylor
On Thu, 2002-11-21 at 15:09, scott.marlowe wrote: > On 21 Nov 2002, Rod Taylor wrote: > > > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > > Of course, those would be SQL purists who _don't_ understand > > > concurrency issues. ;-) > > > > Or they're the kind that locks the entire table f

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread scott.marlowe
On 21 Nov 2002, Rod Taylor wrote: > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > Of course, those would be SQL purists who _don't_ understand > > concurrency issues. ;-) > > Or they're the kind that locks the entire table for any given insert. Isn't that what Bruce just said? ;^) --

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread Tom Lane
"Thomas O'Connell" <[EMAIL PROTECTED]> writes: > It seems worth pointing out, too, that some SQL purists propose not > relying on product-specific methods of auto-incrementing. > I.e., it is possible to do something like: > insert into foo( col, ... ) > values( coalesce( ( select max( col ) from f

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread Rod Taylor
On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > Of course, those would be SQL purists who _don't_ understand > concurrency issues. ;-) Or they're the kind that locks the entire table for any given insert. -- Rod Taylor <[EMAIL PROTECTED]> ---(end of broadcast)-

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread Bruce Momjian
Oliver Elphick wrote: > I deleted the first table. The sequence was deleted too, leaving the > default of the second table referring to a non-existent sequence. > > > Could this be a TODO item in 7.4, to add a dependency check when a > sequence is set as the default without being created at the

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread Bruce Momjian
Of course, those would be SQL purists who _don't_ understand concurrency issues. ;-) --- Thomas O'Connell wrote: > It seems worth pointing out, too, that some SQL purists propose not > relying on product-specific methods o

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-21 Thread Thomas O'Connell
It seems worth pointing out, too, that some SQL purists propose not relying on product-specific methods of auto-incrementing. I.e., it is possible to do something like: insert into foo( col, ... ) values( coalesce( ( select max( col ) from foo ), 0 ) + 1, ... ); and this is easily placed in a t

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Justin Clift
Tom Lane wrote: > > Justin Clift <[EMAIL PROTECTED]> writes: > > Oliver Elphick wrote: > >> I created a sequence using SERIAL when I created a table. I used the > >> same sequence for another table by setting a column default to > >> nextval(sequence). > >> > >> I deleted the first table. The se

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Tom Lane
Justin Clift <[EMAIL PROTECTED]> writes: > Oliver Elphick wrote: >> I created a sequence using SERIAL when I created a table. I used the >> same sequence for another table by setting a column default to >> nextval(sequence). >> >> I deleted the first table. The sequence was deleted too, leaving

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Justin Clift
Neil Conway wrote: > > Justin Clift <[EMAIL PROTECTED]> writes: > > This sounds like a serious bug in our behaviour, and not something > > we'd like to release. > > It's not ideal, I agree, but I *definately* don't think this is > grounds for changing the release schedule. Hey, I'm no fan of slo

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Neil Conway
Justin Clift <[EMAIL PROTECTED]> writes: > This sounds like a serious bug in our behaviour, and not something > we'd like to release. It's not ideal, I agree, but I *definately* don't think this is grounds for changing the release schedule. > No real issue with the nicety for newbies, but am very

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Justin Clift
Oliver Elphick wrote: > > On Wed, 2002-11-20 at 21:35, Robert Treat wrote: > > On Wed, 2002-11-20 at 03:53, Oliver Elphick wrote: > > > On Mon, 2002-11-18 at 15:45, Thomas Aichinger wrote: > > > > Hi, > > > > > > > > I recently installed pg 7.2.3 on my linux box and discovered that > > > > there a

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Rod Taylor
This requires changing the nextval() function to be an attribute of the sequence. ie. sequence.nextval and sequence.currval to deal with the sequence. It should also be on the todo list. On Wed, 2002-11-20 at 17:12, Oliver Elphick wrote: > On Wed, 2002-11-20 at 21:35, Robert Treat wrote: > > O

Re: [HACKERS] [GENERAL] Bug with sequence

2002-11-20 Thread Oliver Elphick
On Wed, 2002-11-20 at 21:35, Robert Treat wrote: > On Wed, 2002-11-20 at 03:53, Oliver Elphick wrote: > > On Mon, 2002-11-18 at 15:45, Thomas Aichinger wrote: > > > Hi, > > > > > > I recently installed pg 7.2.3 on my linux box and discovered that > > > there are some problems with datatype serial