Search Postgresql Archives

Re: RETURNS SETOF RECORD with 1 column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vincenzo Romano <vincenzo.romano@xxxxxxxxxxx> writes:
> CREATE OR REPLACE FUNCTION afun1( OUT ot TEXT )
> RETURNS SETOF RECORD

> The error message for afun1() reads:
> ERROR:  function result type must be text because of OUT parameters

Indeed.  It's trying to protect you from simple typos.

If you want a consistent syntax I'd suggest

CREATE OR REPLACE FUNCTION afun1() RETURNS TABLE (ot text) ...

It's still really "setof text" under the hood.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux