Re: how to call a function with row-type arg

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to call a function with row-type arg
Дата
Msg-id 10528.1063375074@sss.pgh.pa.us
обсуждение исходный текст
Ответ на how to call a function with row-type arg  (sad <sad@bankir.ru>)
Список pgsql-sql
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


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

Предыдущее
От: "vijaykumar M"
Дата:
Сообщение: createlang plpgsql failing on redhatlinux7.2
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: createlang plpgsql failing on redhatlinux7.2