public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Justin Pryzby <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: [email protected]
Cc: Amit Langote <[email protected]>
Subject: Re: \d with triggers: more than one row returned by a subquery used as an expression
Date: Mon, 17 Jan 2022 19:14:34 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Justin Pryzby <[email protected]> writes:
> On Mon, Jan 17, 2022 at 05:02:00PM -0500, Tom Lane wrote:
>> ISTM the real problem is the assumption that only related triggers could
>> share a tgname, which evidently isn't true.  I think this query needs to
>> actually match on tgparentid, rather than taking shortcuts.

> I don't think that should be needed - tgparentid should match
> pg_partition_ancestors().

Uh, what?  tgparentid is a trigger OID, not a relation OID.

> Is there any reason why WITH ORDINALITY can't work ?
> This is passing the smoke test.

How hard did you try to break it?  It still seems to me that
this can be fooled by an unrelated trigger with the same tgname.

			regards, tom lane






view thread (4+ 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], [email protected], [email protected], [email protected]
  Subject: Re: \d with triggers: more than one row returned by a subquery used as an expression
  In-Reply-To: <[email protected]>

* 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