pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Clift <justin@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Oliver Elphick <olly@lfix.co.uk>
Cc: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [GENERAL] Bug with sequence
Date: Thu, 21 Nov 2002 16:03:18 +1100
Message-ID: <3DDC6916.94FDCB3F@postgresql.org> (raw)
References: <92c0776e.0211180745.49911131@posting.google.com>
	<1037782392.29678.88.camel@linda>
	<1037828113.23925.101.camel@camel>
	<1037830378.24840.40.camel@linda>
	<3DDC47A9.4C0BC2DE@postgresql.org>
	<7017.1037851915@sss.pgh.pa.us>

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



view thread (19+ messages)  latest in thread

Message-ID: <3DDC6916.94FDCB3F@postgresql.org>
Permalink:  ../3DDC6916.94FDCB3F@postgresql.org/
Also on:    postgresql.org/message-id/3DDC6916.94FDCB3F@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: justin@postgresql.org, tgl@sss.pgh.pa.us, olly@lfix.co.uk, xzilla@users.sourceforge.net, pgsql-hackers@postgresql.org
  Subject: Re: [GENERAL] Bug with sequence
  In-Reply-To: <3DDC6916.94FDCB3F@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox