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

Re: Return Query

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Edwin Quijada <listas_quijada(at)hotmail(dot)com>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Return Query
Date: 2008-06-30 15:26:11
Message-ID: 20080630152611.GG10311@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
Edwin Quijada escribió:
> 
> 
> > fijate que debe haber tantos parametros OUT como columnas en el select
> 
> 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;
>  
> 
> 
> select * from f1()
> 
> 
> tengo 2 out y dos columnas y sigue el mismo error

Las columnas OUT deben ser del mismo tipo de las de la tabla.


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

pgsql-es-ayuda by date

Next:From: Gunnar WolfDate: 2008-06-30 15:28:42
Subject: Re: Retorno de tipo boolean
Previous:From: Edwin QuijadaDate: 2008-06-30 15:12:28
Subject: RE: Return Query

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