Knowing when it is safe to call currval()

Поиск
Список
Период
Сортировка
От Matthew Horoschun
Тема Knowing when it is safe to call currval()
Дата
Msg-id 9377CBC6-8366-11D7-B0B7-000393B3A702@canprint.com.au
обсуждение исходный текст
Ответы Re: Knowing when it is safe to call currval()
Список pgsql-sql
Hi All,

Is there any way to know ahead of time whether calling currval() on a 
sequence will cause an exception like:

ERROR:  some_id_seq.currval is not yet defined in this session

In my function I can't be sure whether nextval() will have previously 
been called in the session.

Thanks

Matthew.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: merge-join for domain with underlying type text
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Knowing when it is safe to call currval()