Re: Do FROM items of different schemas conflict?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Do FROM items of different schemas conflict?
Date: 2002-03-08 22:34:48
Message-ID: 21859.1015626888@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fernando Nasser 2002-03-08 23:13:37 Re: Do FROM items of different schemas conflict?
Previous Message Bruce Momjian 2002-03-08 22:27:39 Re: Do FROM items of different schemas conflict?