Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fASGn5m83363 for ; Wed, 28 Nov 2001 11:49:05 -0500 (EST) (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.4/8.11.4) with ESMTP id fASGn8k02640; Wed, 28 Nov 2001 11:49:08 -0500 (EST) To: =?ISO-8859-1?Q?=22Johnny_J=F8rgensen=22?= cc: pgsql-sql@postgresql.org Subject: Re: PL/pgSQL loops? In-reply-to: <200111281540250450.0093EFC2@mail.halfahead.dk> References: <200111281325520802.0018C1FB@mail.halfahead.dk> <200111281540250450.0093EFC2@mail.halfahead.dk> Comments: In-reply-to =?ISO-8859-1?Q?=22Johnny_J=F8rgensen=22?= message dated "Wed, 28 Nov 2001 15:40:25 +0100" Date: Wed, 28 Nov 2001 11:49:07 -0500 Message-ID: <2637.1006966147@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200111/386 X-Sequence-Number: 5768 =?ISO-8859-1?Q?=22Johnny_J=F8rgensen=22?= writes: > I have a problem with the following function: > [snip] > - counting my way through the thing, i gather that it's the last END LOOP; = > that causes problems - but it's in every way similar to the inner loop? I can't see anything wrong with it either. What PG version are you running? > does compile mean "This is the first run, so I compile the thing" (to make = > it possible to create interdependent functions), or does it mean "The funct= > ion is called, so I compile it, in the current setting, and execute it"? I've tried to clarify this in the docs for 7.2; see http://candle.pha.pa.us/main/writings/pgsql/sgml/plpgsql.html#PLPGSQL-OVERVIEW regards, tom lane