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@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461