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

Re: Can the following be done?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Juan Francisco Diaz <j-diaz(at)publicar(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Can the following be done?
Date: 2003-08-26 19:35:25
Message-ID: 20030826123418.O37556-100000@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Tue, 26 Aug 2003, Juan Francisco Diaz wrote:

> Create or replace function foo(param1, param2, param3) RETURNS SETOF
> RECORD(name TEXT, age INTEGER, address TEXT) AS ' ... ' LANGUAGE 'plpgsql';
>
> If this is not possible, is there any way to have always the same names and
> types for the returning columns when using SETOF RECORD?

You can make a composite type and return a set of that (you might want to
see http://techdocs.postgresql.org/guides/SetReturningFunctions )


In response to

pgsql-novice by date

Next:From: Juan Francisco DiazDate: 2003-08-26 20:44:39
Subject: Returning a setof integer
Previous:From: Luis H.Date: 2003-08-26 19:35:13
Subject: Re: Using PostgreSQL with PHP / Scope an Lifetime of $result

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