Re: debug_print_plan logs table alias used in join, not table name itself

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: frank joerdens <fiskadoro(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, dev <dev(at)woome(dot)com>
Subject: Re: debug_print_plan logs table alias used in join, not table name itself
Date: 2011-01-19 18:10:31
Message-ID: 23413.1295460631@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

frank joerdens <fiskadoro(at)gmail(dot)com> writes:
> I was just experimenting with debug logging on 8.3 and am finding that
> I can't get it to log the table names involved in a given query, it
> will always print the table alias used in your join instead, e.g.

I don't know why you think that debug_print_plan is meant to do any such
thing; it isn't meant to be useful to end users at all. You could get
the table identity from the relation OID that's in the plan tree, but
the name is not there.

In 8.4 and up there's an "auto_explain" contrib module that is probably
much closer to what you want.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-01-19 18:19:17 Re: How can I find a schema that a table belong to?
Previous Message Tom Lane 2011-01-19 18:04:16 Re: Some problem with the NOTIFY/LISTEN