Re: Calling plSQL functions - Mailing list pgsql-sql

From Tom Lane
Subject Re: Calling plSQL functions
Date
Msg-id 5332.987188573@sss.pgh.pa.us
Whole thread Raw
In response to Re: Calling plSQL functions  (Lonnie Cumberland <lonnie_cumberland@yahoo.com>)
List pgsql-sql
Lonnie Cumberland <lonnie_cumberland@yahoo.com> writes:
> Actually I have the need at different places in my functions to
> sometimes work on the list items returned from a query and also have
> the need to just work on the first result returned by a query.

SELECT ... LIMIT 1 will serve the second need.  For the first, perhaps
use the FOR ... loop construct in plpgsql.
        regards, tom lane


pgsql-sql by date:

Previous
From: Lonnie Cumberland
Date:
Subject: Re: Calling plSQL functions
Next
From: Josh Berkus
Date:
Subject: Re: Calling plSQL functions