Definition of return types for own functions?

Поиск
Список
Период
Сортировка
От Matthias.Pitzl@izb.de
Тема Definition of return types for own functions?
Дата
Msg-id 11EC9A592C31034C88965C87AF18C2A70CFC71@m0000s61
обсуждение исходный текст
Ответы Re: Definition of return types for own functions?
Re: Definition of return types for own functions?
Список pgsql-general
Hello all!

Is it possible to define a complex return type like a record in a function
without having some table around with the needed structure of the return
values?
For example: if i want a function that returns a date and an integer, i
create the function:

CREATE FUNCTION bla(text) RETURNS SETOF table_name AS '...

And i need the table table_name with the structure:
CREATE TABLE table_name( datum DATE, zahl INTEGER);

Can i somehow define this structe inside the function declaration without
having some empty tables or views around?

Thank you all!

Best regards,
Matthias

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