Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Karl O. Pinc" <kop@xxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux