NEXT VALUE FOR sequence

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема NEXT VALUE FOR sequence
Дата
Msg-id 1519041831.2503.15.camel@cybertec.at
обсуждение исходный текст
Ответы Re: NEXT VALUE FOR sequence  ("Daniel Verite" <daniel@manitou-mail.org>)
Re: NEXT VALUE FOR sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
The SQL standard has the expression "NEXT VALUE FOR asequence" to do
what we traditionally do with "nextval('asequence')".

This is an attempt to implement this on top of the recently introduced
NextValueExpr node.

If there is no obvious reason why we would not want that, I'll add it
to the next commitfest.

Is this behavior ok:

test=> CREATE SEQUENCE testseq;
test=> PREPARE x AS SELECT NEXT VALUE FOR testseq;
test=> EXECUTE x;
 ?column? 
----------
        1
(1 row)

test=> DROP SEQUENCE testseq;
DROP SEQUENCE
test=> EXECUTE x;
ERROR:  could not open relation with OID 24836

If not, what could be done about it?

Yours,
Laurenz Albe
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: extern keyword incorrectly used in some function definitions
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: Prefix operator for text and spgist support