Re: EXPLAIN on DELETE statements - Mailing list pgsql-general

From Grant McLean
Subject Re: EXPLAIN on DELETE statements
Date
Msg-id 1091396315.1363.47.camel@putnam
Whole thread Raw
In response to EXPLAIN on DELETE statements  (Janning Vygen <vygen@gmx.de>)
List pgsql-general
On Wed, 2004-07-28 at 23:41, Janning Vygen wrote:
> Hi,
>
> EXPLAIN on delete stamements works, but doesn't show me all the subsequent
> deletes or checks which has to be done because of foreign keys
> cascading/restricting.
>
> Is there a solution to show up which tables are checked and which scans the
> planner is going to use to check these related tables?

You could try enabling the 'log_statement' and related entries in the
postgresql.conf file and possibly the -d option for debugging on the
Postmaster.  I know I get the referential integrity check queries
showing up in the PostgreSQL log (syslog actually) on my server but I'm
not exactly sure what I did to cause that :-).  Here's an example:

LOG:  statement: SELECT 1 FROM ONLY "public"."audit_type" x WHERE
"audit_type_id" = $1 FOR UPDATE OF x

Regards
Grant



pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL, GnuCash
Next
From: Christopher Browne
Date:
Subject: Re: PostgreSQL, GnuCash