Re: can we create a record of more than one field?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: can we create a record of more than one field?
Date: 2008-10-31 05:29:05
Message-ID: 10906.1225430945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec> writes:
> in the spanish list someone reports that the following function
> doesn't even compile:

> CREATE FUNCTION select_temporal(OUT valor integer) RETURNS SETOF record AS
> $BODY$
> begin
> return query select 1::integer;
> return;
> end;
> $BODY$
> LANGUAGE 'plpgsql' VOLATILE;

> and this is the error message
> ERROR: function result type must be integer because of OUT parameters

It's not a record, it's an integer... if you had more than one out
parameter then "record" would be sensible ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2008-10-31 06:19:15 Re: array_agg and array_accum (patch)
Previous Message Jaime Casanova 2008-10-31 05:18:08 can we create a record of more than one field?