Re: [SQL] Odd unfamiliar Postgres SQL syntax

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Odd unfamiliar Postgres SQL syntax
Дата
Msg-id 9468.1501527797@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [SQL] Odd unfamiliar Postgres SQL syntax  (Sonny <sonny.chee@gmail.com>)
Список pgsql-sql
Sonny <sonny.chee@gmail.com> writes:
> Can someone help me understand the following SQL?  What does the notation
> (i.keys).n and (i.keys).x mean... as indicated by the <<<=== in the query.

"(i.keys).n" is selecting the column named "n" from the composite-valued
column "i.keys", where "i" is a table alias exposed by the FROM clause.
The reason we don't just write "i.keys.n" is that the SQL standard says
that should mean column "n" in a table "i.keys" exposed by the FROM
clause --- that is, "i" would be a schema name not a table alias, and
"keys" would be a table name not a column name.
        regards, tom lane



В списке pgsql-sql по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [SQL] Odd unfamiliar Postgres SQL syntax
Следующее
От: Majid Khan
Дата:
Сообщение: [SQL] PostgreSQL connection with Android Studio