Re: Why UPDATE gl SET gl.glnum = gl.glnum; cause error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why UPDATE gl SET gl.glnum = gl.glnum; cause error
Дата
Msg-id 22527.1120834716@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why UPDATE gl SET gl.glnum = gl.glnum; cause error  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> On Fri, 8 Jul 2005, David Gagnon wrote:
>> UPDATE gl SET gl.glnum = gl.glnum
>> ERROR:  column "gl" of relation "gl" does not exist
>>
>> the TABLE.COLUMN is not in the SQL standard ?

> For at least 92 (and I'm almost certain 99) not in the SET list.  It uses
> column name (which is a plain identifier) rather than a column reference.

More specifically, it'd be OK to write
    SET glnum = gl.glnum
but not as you have it.

Since 8.0 Postgres uses the above syntax to refer to assignment to a
subfield of a composite-type field, so that's why you get a complaint
about a nonexistent column instead of a flat-out syntax error.

            regards, tom lane

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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: mail change for list?
Следующее
От: Stephen Bowman
Дата:
Сообщение: Postgresql 7.4.8 inconsistent index usage