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

Re: Sequence functions

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sequence functions
Date: 2003-05-29 19:15:35
Message-ID: 1054235734.13721.46.camel@jester (view raw or flat)
Thread:
Lists: pgsql-hackers
Incase someone is interested, here is a patch without the CURRENT VALUE
FOR portion.

On Sat, 2003-05-24 at 23:39, Rod Taylor wrote:
> We need to track sequence usage in things like defaults.  nextval()
> function calls don't easily allow this to happen.
> 
> The 200N spec has NEXT VALUE FOR <seqname> as the equivalent to
> nextval(), which would allow this to happen.
> 
> I can make VALUE an IDENT in gram.y to prevent it from becoming a
> reserved keyword.
> 
> 
> I would also like to add CURRENT VALUE FOR <seqname> for an equivalent
> to currval().  CURRENT would need to become a reserved word for this to
> happen.
> 
> The SQL spec has several reason why CURRENT should be reserved including
> several cursor manipulation items (WHERE CURRENT OF), a windowing
> function (is this based on cursors?), DISCONNECT, etc.
> 
> Any objections to making CURRENT a reserved word?
> 
> 
> BTW, VALUE also seems to be used for a special form of unique
> constraint. UNIQUE(VALUE) which is equivalent to UNIQUE(SELECT * FROM
> <table>).
-- 
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-05-29 19:19:09
Subject: Re: Question about simple function folding optimization
Previous:From: Bruno Wolff IIIDate: 2003-05-29 19:04:54
Subject: Re: Question about simple function folding optimization

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