How to get list of sequence names in Postgres?

前端 未结 2 2056
醉话见心
醉话见心 2021-02-14 14:07

I want to get the list of sequence names in Postgres.

In Oracle, I can use:

select sequence_name 
from user_sequences

But in Postgres w

2条回答
  •  孤街浪徒
    2021-02-14 14:52

    SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';
    Or trying running psql as psql -U username -E followed by \ds. This will show you the query that was been used to generate the result as well.

提交回复
热议问题