sad <[EMAIL PROTECTED]> writes:
>  how to call a function with a row_type arg ??

> CREATE FUNCTION foo(tablename) returns int .....

        SELECT foo(tablename) FROM tablename;
or
        SELECT 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to