Received: from sss.pgh.pa.us ([216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3DJ2v801506 for ; Fri, 13 Apr 2001 15:02:58 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f3DJ2rR05335; Fri, 13 Apr 2001 15:02:53 -0400 (EDT) To: Lonnie Cumberland cc: pgsql-sql@postgresql.org Subject: Re: Calling plSQL functions In-reply-to: <20010413185714.7788.qmail@web12502.mail.yahoo.com> References: <20010413185714.7788.qmail@web12502.mail.yahoo.com> Comments: In-reply-to Lonnie Cumberland message dated "Fri, 13 Apr 2001 11:57:14 -0700" Date: Fri, 13 Apr 2001 15:02:53 -0400 Message-ID: <5332.987188573@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200104/208 X-Sequence-Number: 2558 Lonnie Cumberland 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