Re: Do FROM items of different schemas conflict? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Do FROM items of different schemas conflict?
Date
Msg-id 21859.1015626888@sss.pgh.pa.us
Whole thread Raw
In response to Re: Do FROM items of different schemas conflict?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> SELECT * FROM schema1.tab1, schema2.tab1;

> From my simplistic understanding, I would say if we allowed this, we
> would have to require the schema designtation be on every reference to
> tab1 in the query.  Is that something we can do?

Well, that's what's not entirely clear to me.

If you write
SELECT ... FROM schema1.tab1 AS tab1;

then clearly this item *can* be referenced by just tab1.col1, and
probably a strict reading would say that it *must* be referenced
that way (ie, schema1.tab1.col1 should not work).  But in the case
without the AS clause, I'm not at all sure what the spec means to
allow.

(BTW, the equivalent passages in SQL99 are no help; they are several
times longer but utterly fail to clarify the point.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: alex@AvengerGear.com (Debian User)
Date:
Subject: Re: Object ID reference
Next
From: Fernando Nasser
Date:
Subject: Re: Do FROM items of different schemas conflict?