Re: view table pkey values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: view table pkey values
Дата
Msg-id 16165.1251136332@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: view table pkey values  (Scott Frankel <leknarf@pacbell.net>)
Ответы Re: view table pkey values
Список pgsql-general
Scott Frankel <leknarf@pacbell.net> writes:
> Is there a command that lists the values for the internal,
> foo_foo_id_seq, sequence?

select * from foo_foo_id_seq;

The usual way to get into this sort of trouble is to load a bunch of
data into the table while explicitly specifying ID values.  It will
take the data (as long as it doesn't conflict with existing IDs)
but nothing happens to the sequence.  pg_dump knows it has to update
the sequence too, but a lot of other tools don't; and even with pg_dump
a selective restore can mess things up.

            regards, tom lane

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

Предыдущее
От: Scott Frankel
Дата:
Сообщение: Re: view table pkey values
Следующее
От: Scott Frankel
Дата:
Сообщение: Re: view table pkey values