Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYULl-001r52-8N for pgsql-www@arkaria.postgresql.org; Tue, 22 Aug 2023 16:35:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qYULj-0032M0-Vh for pgsql-www@arkaria.postgresql.org; Tue, 22 Aug 2023 16:35:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYULj-0032Ls-JN for pgsql-www@lists.postgresql.org; Tue, 22 Aug 2023 16:35:23 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qYULg-000Mvv-8w for pgsql-www@postgresql.org; Tue, 22 Aug 2023 16:35:22 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2bbad32bc79so79193241fa.0 for ; Tue, 22 Aug 2023 09:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692722118; x=1693326918; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=7luR1oCPiNLVCFGeTSLYlb9x2LUm3osYoyoj7cKzqM8=; b=ldvpws3rbA1hoOmxyE7dU7ojcYYakBysUBheim6sANAP1lETjSaX8dLrrIgYCzWn72 GV5JWI9hg41Jj5+07pfF2l6nyE1tNagEH+//hWY7FJyTEB9GzyG5xXOBRDBsIySVyWF8 LeKByFy/j12e3ZDhoZo1Qj26pDAqHWbjfYKV25y9Hr273UQf6soWF8GDbGDmH6GqmsrD bZSkK7co2EICj/9qeZ/m/uf3nQfgyUiEFrx2j4TuayqdgQN0BO++vq3uHvkBbbd3XpzH 0Q31zlRQ/8bqY6EdRYszMqr+MG15khslC3RQkcLS9llsvUcRL3WnakpqnG9lR4yyRlOg c8Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692722118; x=1693326918; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7luR1oCPiNLVCFGeTSLYlb9x2LUm3osYoyoj7cKzqM8=; b=fPB54rgvCbhCz3Bzw5mHPQwlepJRG+sukbD8UTdZs1iBB7iTmbNo8UWZNW26dr3UZ8 RVnfTNk4ERTgV/Yj2iv6DqOqvejqBMGbQj9yb0rr+PxemLNP08P49f82IYWfwHr3GeFL Q5CMyShhMFAV50WFuuY955/IqpXvSUPGY0oIvx/tW8ByshXfGouuCnI7ar2TP/dszLLT elj/fpoveOpBPk5PrP6bWbM+6nv3mNR7TWRZw07g0Kz3S2I90JGt7UA6JEJN+LEascmX kRvgFICWvew5qqLQQ2G3vFhxsvXFg7Qx/W1sRgf1DDXSfKJZ2+AoivUQqL/gfTwmphCy nF7A== X-Gm-Message-State: AOJu0Yy/FZQ/J5drEr3fXedgdCMt/DjmtygDQoFoiUTdQFfGRbFvm5MC 5RPsZDI/ItTtUZ+4Y+RbUM7npG3sbBF5U6zJyj/o3j1MYOU= X-Google-Smtp-Source: AGHT+IHd/4/KJC4l4UAu/atTD4AsFTDAnOLktdIS8+oPf7aQdKvIn2tmIswiWuPKX9WwqTFrljfyQB6DM0Zf+GxMARs= X-Received: by 2002:a2e:9b97:0:b0:2bc:b815:d64d with SMTP id z23-20020a2e9b97000000b002bcb815d64dmr5779944lji.30.1692722117866; Tue, 22 Aug 2023 09:35:17 -0700 (PDT) MIME-Version: 1.0 From: Nicholas Meyer Date: Tue, 22 Aug 2023 09:35:06 -0700 Message-ID: Subject: Wiki editor request To: pgsql-www@postgresql.org Content-Type: multipart/alternative; boundary="00000000000089f92806038594fc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000089f92806038594fc Content-Type: text/plain; charset="UTF-8" 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 --00000000000089f92806038594fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I would like editor acce= ss 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 =3D 'pg_class= 9;::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=3Dns.oid)
where seq.relkind =3D 'S'
  and not exists (select * from pg_depend where objid=3Dseq.oid an=
d deptype=3D<=
/span>'a')<=
/span>
order by seq.relname;

As is, the query (copied above) has false n= egatives in the case where oid values happen to collide across different pg= _depend.classid values.

Fixed version:

select ns.=
nspname as sc=
hema_name, se=
q.relname as seq_name
from pg_class=
 as seq
join pg_namespace ns on (seq.relnamespace=3Dns.oid)
where seq.relkind =3D 'S'
  and not exists (select * from pg_depend where objid=3Dseq.oid an=
d deptype=3D<=
/span>'a' and classid =3D 'pg_c=
lass'::regclass)
order by seq.relname;

Nick Meyer
--00000000000089f92806038594fc--