From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Sequence functions |
Date: | 2003-05-25 04:34:38 |
Message-ID: | 3425.1053837278@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Rod Taylor <rbt(at)rbt(dot)ca> writes:
> We need to track sequence usage in things like defaults. nextval()
> function calls don't easily allow this to happen.
Yeah. The Oracle syntax is seqname.nextval(); AFAIK our syntax
nextval('seqname') was a quick-and-dirty approximation to that.
> The 200N spec has NEXT VALUE FOR <seqname> as the equivalent to
> nextval(), which would allow this to happen.
Urgh. These people still think they're writing Cobol, don't they?
Reserved Words 'R Us. This is one of the few places where I like
Oracle's syntax better than the spec's.
I have looked at implementing Oracle's syntax, and it's almost doable
--- the problem is to keep the sequence from getting added to the
query's rangetable (or at least keep it out of the jointree). There
is some speculation about this in the archives, starting at
http://archives.postgresql.org/pgsql-hackers/2001-08/msg00589.php
The regclass-datatype part of this is in the system now, but I didn't
get any further than that.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2003-05-25 13:03:11 | Re: Sequence functions |
Previous Message | Marc G. Fournier | 2003-05-25 04:14:14 | v7.3.3 bundled ... please test ... |