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

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: "Cristiano Duarte" <cunha17(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #2429: Explain does not report object's schema
Date: 2006-05-16 03:45:13
Message-ID: 65937bea0605152045i252d7f4ek3f9523289558f5b9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

I don't think Cristiano is asking for the schema_name in the
EXPLAIN o/p. The request is for the table ALIASes to be shown in the
o/p, which makes more sense than schema_name+table_name, since the
same table can be used in the same query more than once.

Gurjeet.

On 5/15/06, Jim C. Nasby <jnasby(at)pervasive(dot)com> wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-05-16 03:49:49 Re: [BUGS] BUG #2429: Explain does not report object's schema
Previous Message Tom Lane 2006-05-15 21:09:17 Re: BUG #2436: cannot --enable-thread-safety on -lpthread host

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-05-16 03:49:49 Re: [BUGS] BUG #2429: Explain does not report object's schema
Previous Message mark 2006-05-16 03:44:26 Re: Compression and on-disk sorting