Re: \d with triggers: more than one row returned by a subquery used as an expression - Mailing list pgsql-hackers

From Tom Lane
Subject Re: \d with triggers: more than one row returned by a subquery used as an expression
Date
Msg-id 163710.1642464874@sss.pgh.pa.us
Whole thread Raw
In response to Re: \d with triggers: more than one row returned by a subquery used as an expression  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: \d with triggers: more than one row returned by a subquery used as an expression
List pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> 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



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: \d with triggers: more than one row returned by a subquery used as an expression
Next
From: Jelte Fennema
Date:
Subject: Re: [EXTERNAL] Re: PQcancel does not use tcp_user_timeout, connect_timeout and keepalive settings