Re: How to find all current sequence IDs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to find all current sequence IDs
Дата
Msg-id 174178.1708553636@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to find all current sequence IDs  ("Campbell, Lance" <lance@illinois.edu>)
Ответы Re: How to find all current sequence IDs  (Nisarg Patel <er.nisarg@gmail.com>)
Список pgsql-sql
"Campbell, Lance" <lance@illinois.edu> writes:
> Is there a way to get a list of all sequences, the schema it is used in, and the current sequence number in use?

Try something like

select relname, relnamespace::regnamespace, pg_sequence_last_value(oid)
from pg_class where relkind = 'S';

            regards, tom lane



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

Предыдущее
От: "Campbell, Lance"
Дата:
Сообщение: How to find all current sequence IDs
Следующее
От: Nisarg Patel
Дата:
Сообщение: Re: How to find all current sequence IDs