sad <sad@bankir.ru> writes:
> how to call a function with a row_type arg ??
> CREATE FUNCTION foo(tablename) returns int .....
SELECT foo(tablename) FROM tablename;
orSELECT foo(tablename.*) FROM tablename;
The first is traditional Postgres usage, but I think the second makes it
more clear what's going on.
BTW, if you use a table alias then the alias is the name to refer to.
SELECT foo(x.*) FROM tablename as x;
regards, tom lane