Wiki editor request

Поиск
Список
Период
Сортировка
От Nicholas Meyer
Тема Wiki editor request
Дата
Msg-id CANMCTvKyK-hL9g+_ocWKBheCz7apC+DCUbZiaXhFbrJ_CQnoXA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Wiki editor request
Список pgsql-www
Hi,

I would like editor access to the wiki, my username is Nmeyer (https://wiki.postgresql.org/wiki/User:Nmeyer) and I would like to modify the snippet at the end of https://wiki.postgresql.org/wiki/Fixing_Sequences which is missing a condition on classid = 'pg_class'::regclass in the predicate:

select ns.nspname as schema_name, seq.relname as seq_name
from pg_class as seq
join pg_namespace ns on (seq.relnamespace=ns.oid)
where seq.relkind = 'S'  and not exists (select * from pg_depend where objid=seq.oid and deptype='a')
order by seq.relname;

As is, the query (copied above) has false negatives in the case where oid values happen to collide across different pg_depend.classid values.

Fixed version:

select ns.nspname as schema_name, seq.relname as seq_name
from pg_class as seq
join pg_namespace ns on (seq.relnamespace=ns.oid)
where seq.relkind = 'S'  and not exists (select * from pg_depend where objid=seq.oid and deptype='a' and classid = 'pg_class'::regclass)
order by seq.relname;

Nick Meyer

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

Предыдущее
От: Vibhor Kumar
Дата:
Сообщение: Re: Wiki editor request -Speaker Bureau
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Wiki editor request