Skip site navigation (1) Skip section navigation (2)

Re: Proposed patch for sequence-renaming problems

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Proposed patch for sequence-renaming problems
Date: 2005-09-29 02:53:42
Message-ID: 200509290253.j8T2rgQ16494@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Gavin Sherry wrote:
> > I don't think we should use the spec syntax until we're prepared to
> > meet the spec semantics, so NEXT VALUE FOR as part of the current patch
> > seems "out".
> 
> Well, AFAICT, the only part of the spec we cannot implement is what you
> quote above. Therefore, why can't we support NEXT VALUE FOR seqname and
> reject table creation/alteration which would add more than one reference
> to the same sequence. That will allow us to avoid an intermediate step
> in getting to the SQL2003 syntax. Having to support three different
> sequence incrementation mechanisms for three flavours of PostgreSQL is
> going to be a real PITA.

Oh, if we went in that direction, how would we fix loading previous
dumps?  Isn't NEXT VALUE for going to map internally to the
early-binding version of nextval().  I am thinking mucking with
nextval() and its casts is going to be required for ALTER SCHEMA RENAME
to work with any kind of reliability.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-09-29 03:54:48
Subject: Open items list
Previous:From: Bruce MomjianDate: 2005-09-29 02:51:31
Subject: Re: Proposed patch for sequence-renaming problems

pgsql-patches by date

Next:From: Peter EisentrautDate: 2005-09-29 06:36:22
Subject: Re: [PATCHES] Proposed patch for sequence-renaming problems
Previous:From: Bruce MomjianDate: 2005-09-29 02:51:31
Subject: Re: Proposed patch for sequence-renaming problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group