returning parameters from function

Поиск
Список
Период
Сортировка
От Rikard Pavelic
Тема returning parameters from function
Дата
Msg-id 457E769F.4030000@zg.htnet.hr
обсуждение исходный текст
Ответы Re: returning parameters from function  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Hi!

Is there any plan to add implicit declaration of returning parameters
for functions?
Something like:
create function list(in a int) returns setof implicit record as
$$
if a=1 then select * from table1;
else select * from table2;
end if;
$$
languge sql;

which would than dynamically create output parameters depending on
selected query inside.

I think this would be very helpful, and is one of the
most missing features from MSSQL for me.

One other feature that I miss, but no so much is:
storing the entire function, not just the body
(because of this pg cant remember exactly how I wrote the
function, and if there are many parameters inside I get a looong first line)


Regards,
Rikard

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

Предыдущее
От: "surabhi.ahuja"
Дата:
Сообщение: any api in libpq to get the number of connections
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Restore database from files (not dump files)?