| От | Raymond O'Donnell |
|---|---|
| Тема | Re: currval() in insert statements |
| Дата | |
| Msg-id | 4996F2EC.5080709@iol.ie обсуждение исходный текст |
| Ответ на | currval() in insert statements (Onno Molenkamp <onno@flox.org>) |
| Список | pgsql-general |
On 14/02/2009 11:25, Onno Molenkamp wrote:
> I recently upgraded a database from 8.1.11 to 8.3.6, and I noticed the
> following statement stopped working:
>
> insert into test (b) select currval('test_a_seq'::regclass)
I don't think this was ever guaranteed to work - the docs say pretty
clearly that nextval() has to be called before currval() can be expected
to be defined. My feeling is that is was just good fortune that it
worked for you before.
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера