Re: [GENERAL] Bug with sequence - Mailing list pgsql-hackers

From Justin Clift
Subject Re: [GENERAL] Bug with sequence
Date
Msg-id 3DDC6916.94FDCB3F@postgresql.org
Whole thread Raw
In response to Re: [GENERAL] Bug with sequence  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
Tom Lane wrote:
> 
> Justin Clift <justin@postgresql.org> 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 the
> >> default of the second table referring to a non-existent sequence.
> 
> > This sounds like a serious bug in our behaviour, and not something we'd
> > like to release.
> 
> We will be releasing it whether we like it or not, because
> nextval('foo') doesn't expose any visible dependency on sequence foo.

Awww rats.

<snip>
> 7.3 breaks no existing schemas, because older schemas will be dumped
> as separate CREATE SEQUENCE and CREATE TABLE ... DEFAULT nextval()
> commands.

Ok.

Thanks Tom.  :)

Regards and best wishes,

Justin Clift

>                         regards, tom lane

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."  - Indira Gandhi


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: xBSD shmem doc deficiency
Next
From: Jon Jensen
Date:
Subject: Re: xBSD shmem doc deficiency