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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Mon, 30 Jun 2008 11:26:11 -0400
  • Message-id: <20080630152611(dot)GG10311(at)alvh(dot)no-ip(dot)org>

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.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group