Re: Incomplete Explain for delete - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Incomplete Explain for delete
Date
Msg-id CAKFQuwYbdaT_RGpAFx9Z28wDGLLAoY5NfT5nvF4TeXH=3g-NEA@mail.gmail.com
Whole thread Raw
In response to Re: Incomplete Explain for delete  (David Gould <daveg@sonic.net>)
List pgsql-bugs
On Mon, Jun 22, 2015 at 6:32 PM, David Gould <daveg@sonic.net> wrote:

> On Mon, 22 Jun 2015 12:41:28 -0400
> "David G. Johnston" <david.g.johnston@gmail.com> wrote:
>
> > =E2=80=8BExcept that the query inside the trigger is known to system - =
the fact
> it
> > is wrapped in a trigger is an implementation detail that could, in
> theory,
> > be bypassed in order to facilitate a more meaningful explain output.
>
> Unless triggers are prohibited from using dynamic sql, the query really
> cannot be known to the system.
> =E2=80=8B
>

=E2=80=8BMaybe that is the case here as well but the code that is used in t=
he FK
trigger is maintained by the core PostgreSQL project and seldom changes.
Having explain notice that an FK trigger is present and then applying some
discovery to determine the source table and columns of said FK trigger
seems theoretically possible.=E2=80=8B  It does not look inside the trigger=
 -
instead it is explicitly told what a FK trigger does.

I am strictly considering FK triggers here - no other kind and especially
not user-defined ones.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq
Next
From: Thomas Munro
Date:
Subject: Re: BUG #13440: unaccent does not remove all diacritics