Re: Sequence functions
От | Tom Lane |
---|---|
Тема | Re: Sequence functions |
Дата | |
Msg-id | 3425.1053837278@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Sequence functions (Rod Taylor <rbt@rbt.ca>) |
Ответы |
Re: Sequence functions
|
Список | pgsql-hackers |
Rod Taylor <rbt@rbt.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
В списке pgsql-hackers по дате отправления: