Why I need to use SETOF TEXT when I'm returning single column?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Why I need to use SETOF TEXT when I'm returning single column?
Дата
Msg-id 20110209144721.GA19957@depesz.com
обсуждение исходный текст
Список pgsql-general
If I'll make my functions like this:

create function test( out a text, out b text) returns setof record ...

it works well.
but if i have just one column in returned recordset, I cannot:
create function test( out a text ) returns setof record ...
shows:
ERROR:  function result type must be text because of OUT parameters

it's bad because I can't have the column names the way I want it to be
named! (well, I could, using custom datatype, but it's besides the
point.

is there any particular reason why returning single-column "setof
record" is not allowed?

Best regards,

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Possible Bug
Следующее
От: Vick Khera
Дата:
Сообщение: Re: pg_restore validation?