X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A776C4758BD for ; Sun, 23 Feb 2003 18:08:18 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 36933-06 for ; Sun, 23 Feb 2003 18:08:07 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id AFB3B474E5C for ; Sun, 23 Feb 2003 18:08:07 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2853939; Sun, 23 Feb 2003 15:08:08 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "James Cooper" Subject: Re: syntax question Date: Sun, 23 Feb 2003 15:07:23 -0800 User-Agent: KMail/1.4.3 References: <006401c2db87$fc09be00$c900a8c0@jax> <200302231452.00484.josh@agliodbs.com> <007701c2db8f$b22b3ea0$c900a8c0@jax> In-Reply-To: <007701c2db8f$b22b3ea0$c900a8c0@jax> Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Message-Id: <200302231507.23831.josh@agliodbs.com> Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/519 X-Sequence-Number: 11917 James, > I understand this and my current example actually works. > My question is I dont need a loop as it only ever returns one row. This is a current limitation of PL/pgSQL. Until PL/pgSQL is improved by s= ome=20 enterprising soul, you cannot select the results of a query directly into a= =20 RECORD variable without a loop. For that matter, you will find that you cannot declare an array variable=20 inside a PL/pgSQL procedure. This is also on the TODO list. --=20 Josh Berkus Aglio Database Solutions San Francisco