Re: \d with triggers: more than one row returned by a subquery used as an expression

2022-01-17 Thread Tom Lane
I wrote: > Justin Pryzby writes: >> 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. Hmm ... no, it does work, because we'll

Re: \d with triggers: more than one row returned by a subquery used as an expression

2022-01-17 Thread Tom Lane
Justin Pryzby 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.

Re: \d with triggers: more than one row returned by a subquery used as an expression

2022-01-17 Thread Justin Pryzby
On Mon, Jan 17, 2022 at 05:02:00PM -0500, Tom Lane wrote: > Justin Pryzby writes: > > On Fri, Dec 17, 2021 at 09:43:56AM -0600, Justin Pryzby wrote: > >> I want to mention that the 2nd problem I mentioned here is still broken. > >>

Re: \d with triggers: more than one row returned by a subquery used as an expression

2022-01-17 Thread Tom Lane
Justin Pryzby writes: > On Fri, Dec 17, 2021 at 09:43:56AM -0600, Justin Pryzby wrote: >> I want to mention that the 2nd problem I mentioned here is still broken. >> https://www.postgresql.org/message-id/20210717010259.gu20...@telsasoft.com >> It happens if non-inheritted triggers on child and

Re: \d with triggers: more than one row returned by a subquery used as an expression

2021-12-22 Thread Justin Pryzby
On Fri, Dec 17, 2021 at 09:43:56AM -0600, Justin Pryzby wrote: > I want to mention that the 2nd problem I mentioned here is still broken. > https://www.postgresql.org/message-id/20210717010259.gu20...@telsasoft.com > > It happens if non-inheritted triggers on child and parent have the same name.

\d with triggers: more than one row returned by a subquery used as an expression

2021-12-17 Thread Justin Pryzby
I want to mention that the 2nd problem I mentioned here is still broken. https://www.postgresql.org/message-id/20210717010259.gu20...@telsasoft.com It happens if non-inheritted triggers on child and parent have the same name. On Fri, Jul 16, 2021 at 08:02:59PM -0500, Justin Pryzby wrote: > On