how to get list of sequences owned by a user/role

Started by Charlin Barakabout 8 years ago3 messagesgeneral
Jump to latest
#1Charlin Barak
charlinbarak@gmail.com

Hi,
I can find sequences owned by a schema from information_schema.sequences
and pg_class but how do I find sequences owned by a user/role? What pg
table should I be looking at?

Thanks.

Charlin

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Charlin Barak (#1)
Re: how to get list of sequences owned by a user/role

On 03/09/2018 12:08 PM, Charlin Barak wrote:

Hi,
I can find sequences owned by a schema from information_schema.sequences
and pg_class but how do I find sequences owned by a user/role? What pg
table should I be looking at?

https://www.postgresql.org/docs/10/static/view-pg-sequences.html

Thanks.

Charlin

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Adrian Klaver (#2)
Re: how to get list of sequences owned by a user/role

On 03/09/2018 02:22 PM, Adrian Klaver wrote:

On 03/09/2018 12:08 PM, Charlin Barak wrote:

Hi,
I can find sequences owned by a schema from
information_schema.sequences and pg_class but how do I find sequences
owned by a user/role? What pg table should I be looking at?

https://www.postgresql.org/docs/10/static/view-pg-sequences.html

This is new to PG 10.

For older versions:

https://www.postgresql.org/docs/9.6/static/catalog-pg-class.html

Thanks.

Charlin

--
Adrian Klaver
adrian.klaver@aklaver.com