Why I need to use SETOF TEXT when I'm returning single column? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Why I need to use SETOF TEXT when I'm returning single column?
Date
Msg-id 20110209144721.GA19957@depesz.com
Whole thread Raw
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Possible Bug
Next
From: Vick Khera
Date:
Subject: Re: pg_restore validation?