Re: Do FROM items of different schemas conflict?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Do FROM items of different schemas conflict?
Дата
Msg-id 21859.1015626888@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Do FROM items of different schemas conflict?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: alex@AvengerGear.com (Debian User)
Дата:
Сообщение: Re: Object ID reference
Следующее
От: Fernando Nasser
Дата:
Сообщение: Re: Do FROM items of different schemas conflict?