no results for nextval() query?

Поиск
Список
Период
Сортировка
От Steve Lefevre
Тема no results for nextval() query?
Дата
Msg-id 466F2301.6010309@osu.edu
обсуждение исходный текст
Ответы Re: no results for nextval() query?  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-novice
Hello all -

I'm having problems with a primary key column that has a sequence. I'm
trying to reserve a value using nextval ( I've also tried currval() ),
but my query returns no results. I was originally confused because I was
doing "SELECT nextval(column_name) FROM table" instead of "SELECT
nextval(sequence_name) FROM table". Then, I had the sequence name wrong,
so I got a "does not exist" error. However, now that I have the name
right -- and I think it's right because I don't get an error -- I get an
empty result set. What am I doing wrong? The sequence seems to be
working, because the primary key field defaults to the next value in the
sequence when I do an insert.

Steve Lefevre

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

Предыдущее
От: Andrew
Дата:
Сообщение: Recovering Postgres databases
Следующее
От: Steve Lefevre
Дата:
Сообщение: Joins within a table