Re: plpgsql returning resultset

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Thomas Finneid <tfinneid(at)student(dot)matnat(dot)uio(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: plpgsql returning resultset
Date: 2008-09-02 21:19:33
Message-ID: 48BDADE5.9090604@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/09/2008 21:55, Thomas Finneid wrote:
> with val_list in
> select * from tableA
> do
> loop
> return next val_list;
> end loop;

Oops - my mistake - it should indeed be FOR, not WITH, hence your error
message.

One other thing in the above - you don't need the DO, it's just
FOR...LOOP...END LOOP.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roberts, Jon 2008-09-02 21:20:21 Re: Foreign Key normalization question
Previous Message Thomas Finneid 2008-09-02 21:19:06 Re: plpgsql returning resultset