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: (view raw, whole thread or download thread mbox)
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                      
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-2017 The PostgreSQL Global Development Group