Skip site navigation (1) Skip section navigation (2)

RE: Return Query

From: Edwin Quijada <listas_quijada(at)hotmail(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: RE: Return Query
Date: 2008-06-28 17:26:32
Message-ID: BLU137-W44F30B3521AB2C704A869E39D0@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-es-ayuda



> Date: Fri, 27 Jun 2008 22:42:03 -0500
> From: jcasanov(at)systemguards(dot)com(dot)ec
> To: listas_quijada(at)hotmail(dot)com
> Subject: Re: [pgsql-es-ayuda] Return Query
> CC: pgsql-es-ayuda(at)postgresql(dot)org
>
> On Fri, Jun 27, 2008 at 11:06 AM, Edwin Quijada
>  wrote:
>>
>> Consigo el sigte error:
>> ERROR: a column definition list is required for functions returning "record"
>>
>
> create or replace function f1(out id_record integer, out alias text)
> returns setof record as
> $$
> begin
> return query select id_record,alias from uno_email_alias;
> end;
> $$ language plpgsql;
>
Jaime, como la invoco?
Esto me dara mas de una tupla.
Lo hice de esta forma select * from f1(id_record,alias); u me dice que no conoce id_record


>
> --
> Atentamente,
> Jaime Casanova
> Soporte y capacitación de PostgreSQL
> Guayaquil - Ecuador
> Cel. (593) 87171157
> --
> TIP 5: ¿Has leído nuestro extenso FAQ?
> http://www.postgresql.org/docs/faqs.FAQ.html

_________________________________________________________________
Get your fix of news, sports, entertainment and more on MSN Mobile
http://www.msnmobilefix.com/Default.aspx

In response to

Responses

pgsql-es-ayuda by date

Next:From: Edwin QuijadaDate: 2008-06-28 19:08:15
Subject: [OT] Cubanos en la lista
Previous:From: Jaime CasanovaDate: 2008-06-28 03:42:03
Subject: Re: Return Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group