public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nicholas Meyer <[email protected]>
To: [email protected]
Subject: Wiki editor request
Date: Tue, 22 Aug 2023 09:35:06 -0700
Message-ID: <CANMCTvKyK-hL9g+_ocWKBheCz7apC+DCUbZiaXhFbrJ_CQnoXA@mail.gmail.com> (raw)

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_namefrom pg_class
as seqjoin 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_namefrom pg_class
as seqjoin 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


view thread (323+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Wiki editor request
  In-Reply-To: <CANMCTvKyK-hL9g+_ocWKBheCz7apC+DCUbZiaXhFbrJ_CQnoXA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox