Re: functions with side effect

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: functions with side effect
Дата
Msg-id 1532010452.2387.1.camel@cybertec.at
обсуждение исходный текст
Ответ на functions with side effect  (Torsten Förtsch <tfoertsch123@gmail.com>)
Список pgsql-general
Torsten Förtsch wrote:
> assuming 
> 
> SELECT nextval('s'), currval('s');
> 
> or
> 
> SELECT * FROM (VALUES (nextval('s'), currval('s'))) t;
> 
> is there any guarantee that the 2 output values are the same?

You can use at EXPLAIN (VERBOSE) output to see if it will work
in this special case, but I wouldn't depend on it in general.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com


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

Предыдущее
От: Torsten Förtsch
Дата:
Сообщение: functions with side effect
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cache lookup failed for attribute 1 of relation XXXXXX