pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@gmail.com>
To: pgsql-sql@postgresql.org
Cc: John Fabiani <johnf@jfcomputer.com>
Subject: Re: avoid the creating the type for setof
Date: Fri, 30 Dec 2011 06:49:42 -0800
Message-ID: <201112300649.42983.adrian.klaver@gmail.com> (raw)
In-Reply-To: <1762087.ynHxkPSFx3@linux-12>
References: <1762087.ynHxkPSFx3@linux-12>

On Friday, December 30, 2011 6:26:19 am John Fabiani wrote:
> Hi,
> I recall somewhere I saw a simple plpgsql function that returned a table
> with more than one record that did not use a defined type or a temp table
> ( at least I think I did).  Is it possible to create such a function that
> will return more than one record and not require a record type or temp
> table?
> 
> something like
> 
> return setof record as
> return query select ...

http://www.postgresql.org/docs/9.0/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-PARAMET...

39.3.1. Declaring Function Parameters

Search for RETURNS TABLE

> 
> return
> 
> 
> Johnf

-- 
Adrian Klaver
adrian.klaver@gmail.com



view thread (4+ messages)  latest in thread

Message-ID: <201112300649.42983.adrian.klaver@gmail.com>
Permalink:  ../201112300649.42983.adrian.klaver@gmail.com/
Also on:    postgresql.org/message-id/201112300649.42983.adrian.klaver@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adrian.klaver@gmail.com, johnf@jfcomputer.com
  Subject: Re: avoid the creating the type for setof
  In-Reply-To: <201112300649.42983.adrian.klaver@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox