Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

Поиск
Список
Период
Сортировка
От Ayush Vatsa
Тема Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Дата
Msg-id CACX+KaMore7Q-5QUQnTT5R0gKmsa_4jzqn+cmMaSwv6f2KWXCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Список pgsql-general
Hi David,
Thanks for clarification
I prefer TABLE.  Using setof is more useful when the returned type is predefined
But in the table also isn't the returned type predefined? Example:
CREATE FUNCTION fun1(integer)
RETURNS TABLE(
        col1 integer,
        col2 text
)
AS 'MODULE_PATHNAME', 'fun1'
LANGUAGE C;
We know the returned type will have two columns with type -  integer and text. Am I correct?

Or a true record where the caller has to specify the shape.
Sorry but didn't get this shape part?

Thanks
Ayush Vatsa

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Proper format for pg_dump file date
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions