| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Rod Taylor <pg(at)rbt(dot)ca> | 
| Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> | 
| Subject: | Re: NEXT VALUE FOR... | 
| Date: | 2004-05-08 03:03:28 | 
| Message-ID: | 200405080303.i4833SQ08717@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-patches | 
Patch withdrawn by author.
---------------------------------------------------------------------------
Rod Taylor wrote:
> It would appear the spec was approved of before we got foo.nextval, so
> here it is again.
> 
> NEXT VALUE FOR and CURRENT VALUE FOR where CURRENT is an unreserved
> keyword and VALUE is not reserved in any way (ident with comparison to
> "value").
> 
> This allows the default of a table to depend on a sequence, CASCADE drop
> of the sequence removes removes references to it.
> 
> CURRENT VALUE FOR is an extension of the spec.
> 
> 
> This gives us almost everything required for the Sequence feature (T176)
> (as per the draft).
> 
> We're missing the datatype specification on the sequence.
> 
> CREATE SEQUENCE t AS numeric(130);
> 
> 
> Rod Taylor <rbt ( at ) rbt ( dot ) ca> writes: 
> > Are you ok with the DB2 and draft-spec syntax of NEXT VALUE FOR (where
> > value is not a reserved word)?  Or should I hold onto that until the
> > spec has gone through the final draft / release?
> 
> By that time we'll have done the Oracle-style foo.nextval, and it'll
> become kind of a moot point ;-)
> 
> 			regards, tom lane
[ Attachment, skipping... ]
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
-- 
  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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fabien COELHO | 2004-05-08 09:46:11 | fix schema ownership on first connection preliminary patch | 
| Previous Message | Bruce Momjian | 2004-05-08 03:00:35 | Re: [BUGS] BUG #1148: server restarts depending on stats options |