Re: [BUGS] BUG #2429: Explain does not report object's schema

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Cristiano Duarte <cunha17(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #2429: Explain does not report object's schema
Date: 2006-05-15 17:54:38
Message-ID: 20060515175438.GU26212@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Moving to -hackers

On Wed, May 10, 2006 at 11:26:30AM -0300, Cristiano Duarte wrote:
> > Don't know whether this would help in your situation, but you can make the
> > output of EXPLAIN disambiguous by using table aliases:
> >
> > EXPLAIN
> > SELECT *
> > FROM schema1.mytable AS mt1, schema2.mytable AS mt2
> > WHERE 1=0
> >
> > (The AS keyword is optional.)
> >
> > The aliases will be included in the query plan output.
> >
> Thanks for the notice, but to do this, I would have to raise errors on
> queries having tables with the same name, which is not what I meant.
>
> But, if there is no other way, I'll do it.

So you actually write out schemaname.tablename.fieldname for every field
in the SELECT clause? Yikes!

In any case, I agree that there should be a way to have EXPLAIN (and
other things) show schema names. But since this isn't an itch that any
of the developers have felt like scratching, it's unlikely this will
happen unless someone sponsors it. :/

Unless folks think it's specifically a bad idea, can we at least get it
on the TODO so if someone's bored it might get done?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-15 18:14:01 Re: BUG #2431: Error:SELECT query has no destination for result data
Previous Message Jim C. Nasby 2006-05-15 17:49:15 Re: BUG #2428: ERROR: out of memory, running INSERT SELECT

Browse pgsql-hackers by date

  From Date Subject
Next Message Joachim Wieland 2006-05-15 18:11:28 Re: [TODO] Allow commenting of variables ...
Previous Message Jim C. Nasby 2006-05-15 17:45:40 Compression and on-disk sorting