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

Re: [PATCHES] Non-colliding auto generated names

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Non-colliding auto generated names
Date: 2003-03-05 20:04:04
Message-ID: 200303052004.h25K44U27228@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Yes, our sequence name/column linkage should be much more automatic than
it is now, and if we do that, we can start to think about sequence name
collision avoidance.

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.
> On Wed, 2003-03-05 at 14:37, Bruce Momjian wrote:
> > Interesting idea.  The bigger problem is that apps who use the sequence
> > name also would have problems running after the restore.  Seems we need
> > column.nextval() so you can increment the sequence without knowing the
> > sequence name, just the column name.  Of course, this related to this
> > TODO item:
> > 
> > 	* Have sequence dependency track use of DEFAULT sequences,
> > 	  seqname.nextval
> 
> 200N spec proposes 'NEXT VALUE FOR <sequence>'.
> 
> Tom will shoot me if I submit that though (VALUE as a keyword again).  I
> suppose one could make it a variable, and confirm it's value is VALUE?
> 
> Other than that it should be a fairly simple task.
> 
> 
> Anyway, once again we could extend to include:
> 
> NEXT VALUE ON table(column)?
> 
> 
> An application that was simply interested in the next value of a table
> column could simply evaluate the default value -- which should be easily
> retrievable and more portable in most interfaces (jdbc, odbc, etc.).
> 
> -- 
> Rod Taylor <rbt(at)rbt(dot)ca>
> 
> PGP Key: http://www.rbt.ca/rbtpub.asc
-- End of PGP section, PGP failed!

-- 
  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: mlwDate: 2003-03-05 20:05:03
Subject: Re: Best setup for RAM drive
Previous:From: Rod TaylorDate: 2003-03-05 19:47:04
Subject: Re: [PATCHES] Non-colliding auto generated names

pgsql-patches by date

Next:From: Tom LaneDate: 2003-03-05 21:53:20
Subject: Re: [PATCHES] Non-colliding auto generated names
Previous:From: Rod TaylorDate: 2003-03-05 19:47:04
Subject: Re: [PATCHES] Non-colliding auto generated names

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