Re: BUG #5360: system column named "text"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5360: system column named "text"
Дата
Msg-id 14690.1267642238@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5360: system column named "text"  ("Sergey Manakov" <vialorn@gmail.com>)
Список pgsql-bugs
"Sergey Manakov" <vialorn@gmail.com> writes:
> I have some table with column named "remark" and without column named
> "text". I wrote SQL where try to select column named "text" by mistake:

> SELECT st.text
> FROM sometable st

> Where error expected, but query executed without error! Query result is one
> column contains text representation of ROWs.

> Is this a bug, or I'am look for description in docs badly?

No, it's not a bug.  It's equivalent to text(st) or st::text, that
is the system thinks you're requesting a coercion of the rowtype
value to text.  The syntactic equivalence of f(foo) and foo.f is
documented near the end of section 34.4.2:
http://www.postgresql.org/docs/8.4/static/xfunc-sql.html#AEN43797

            regards, tom lane

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

Предыдущее
От: "Sergey Manakov"
Дата:
Сообщение: BUG #5360: system column named "text"
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Bug in triggers