[GENERAL][SQL] Functions with composite resutl-set

Поиск
Список
Период
Сортировка
От Herve Lefebvre
Тема [GENERAL][SQL] Functions with composite resutl-set
Дата
Msg-id 19980721141935.24087.rocketmail@web2.rocketmail.com
обсуждение исходный текст
Список pgsql-general
Hi all,

I've a function who retrieves multiple columns:

CREATE FUNCTION myfunc() RETURNS SETOF mytable
AS 'SELECT a,b,c FROM mytable;' LANGUAGE 'sql';

When I call it, I cannot retrieve all columns without
executing 3 times the function.

select myfunc() does not work

select a(myfunc()), b(myfunc()), c(myfunc()) works but executes 3
times the function.

I've tried
select *(mynfunc())
select all(myfunc())
select myfunc()::mytable
select myfunc()::mytable.*
...

But i've a syntax error on each of these.

Any help ? Thanks.

--
Herve LEFEBVRE




_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Предыдущее
От: Dan Delaney
Дата:
Сообщение: [SQL] Can I store bitmap graphics in a table?
Следующее
От: Matt McClure
Дата:
Сообщение: Re: [GENERAL] [SQL] Can I store bitmap graphics in a table?