Обсуждение: how to get list of sequences owned by a user/role

Поиск
Список
Период
Сортировка

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

От
Charlin Barak
Дата:
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

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

От
Adrian Klaver
Дата:
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


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

От
Adrian Klaver
Дата:
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