Re: [GENERAL] Bug with sequence

From: Justin Clift <justin(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Bug with sequence
Date: 2002-11-21 05:03:18
Message-ID: 3DDC6916.94FDCB3F@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Tom Lane wrote:
>
> Justin Clift <justin(at)postgresql(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2002-11-21 05:29:45 Re: Dumb Newbie Question - Mandrake 9.0 / PGSQL 7.2
Previous Message Tom Lane 2002-11-21 05:02:01 Re: get_bit etc.

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Jensen 2002-11-21 05:14:25 Re: xBSD shmem doc deficiency
Previous Message Neil Conway 2002-11-21 04:48:47 xBSD shmem doc deficiency

Browse pgsql-sql by date

  From Date Subject
Next Message Justin Georgeson 2002-11-21 05:20:19 select for update
Previous Message Tom Lane 2002-11-21 04:11:55 Re: [GENERAL] Bug with sequence