Re: New.* and old.* as function arguments within rules

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: New.* and old.* as function arguments within rules
Дата
Msg-id 5111.1133670583@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: New.* and old.* as function arguments within rules  ("Karl O. Pinc" <kop@meme.com>)
Ответы Re: New.* and old.* as function arguments within rules  ("Karl O. Pinc" <kop@meme.com>)
Список pgsql-general
"Karl O. Pinc" <kop@meme.com> writes:
> 2nd, nowhere have I found a NEW.* syntax (as written).

This could certainly stand to be better documented, but there is an
example for instance here:
http://developer.postgresql.org/docs/postgres/xfunc-sql.html#AEN31568

In general, "foo.*" where foo is a visible table alias is meaningful
anywhere that a rowtype value would be accepted.  There is a special
case at the top level of a SELECT result list, where it will be broken
apart into a list of foo's component fields because the SQL spec says
so.

At one time you could just write "foo" instead of "foo.*", but that's
deprecated because it's ambiguous against the case of a simple column
"foo".  I'm not sure to what extent it still works at all, and it
probably will stop working in any remaining cases someday.

NEW/OLD are not different from other table aliases as far as these
matters go.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Missing variable "role" in "pg_settings"?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Missing variable "role" in "pg_settings"?