currval and nextval in 7.3.4

Поиск
Список
Период
Сортировка
От Keith Marr
Тема currval and nextval in 7.3.4
Дата
Msg-id 200310230051.07009.marrk@comcast.net
обсуждение исходный текст
Ответы Re: currval and nextval in 7.3.4  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: currval and nextval in 7.3.4  (j6m@adm.estp.fr)
Список pgsql-bugs
Hi,

I recently installed 7.3.4 (complete install from scratch) and both 'select
nextval('my_seq') from my_table' and 'select currval('my_seq') from my_table'
return a number of rows equal to the number of rows in the table.

The sequence was created with a SERIAL type if that helps.
 In 'psql' the results look like this.

my_db=# select nextval('my_seq') from my_table;
 nextval
---------
       6
       7
       8
       9
(4 rows)

my_db=# select currval('my_seq') from my_table;
 currval
---------
       9
       9
       9
       9
(4 rows)

I get the same results using the JDBC driver so it's not a psql problem.

Any thoughts out there?

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

Предыдущее
От: dedy setiawan
Дата:
Сообщение: my postgreSQL 7.4 beta for windows
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: my postgreSQL 7.4 beta for windows