X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 14B59D1B8CD for ; Thu, 28 Aug 2003 18:57:59 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 71484-05 for ; Thu, 28 Aug 2003 15:57:48 -0300 (ADT) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by svr1.postgresql.org (Postfix) with ESMTP id 11AA3D1B8C5 for ; Thu, 28 Aug 2003 15:57:47 -0300 (ADT) Received: from www.claymountain.com (crash.claymountain.com [62.142.127.138]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id DA8562ABD1B; Thu, 28 Aug 2003 21:57:47 +0300 (EEST) Received: from 10.0.0.10 (SquirrelMail authenticated user mos) by www.claymountain.com with HTTP; Thu, 28 Aug 2003 21:57:36 +0300 (EEST) Message-ID: <1824.10.0.0.10.1062097056.squirrel@www.claymountain.com> In-Reply-To: <10442.1062077597@sss.pgh.pa.us> References: <1062056068.19315.24.camel@taekwondo.intra.pretax.net> <10442.1062077597@sss.pgh.pa.us> Date: Thu, 28 Aug 2003 21:57:36 +0300 (EEST) Subject: Re: plpgsql: Bush becomes a null, From: "Mauri Sahlberg" To: "Tom Lane" Cc: pgsql-admin@postgresql.org User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/344 X-Sequence-Number: 10064 Thank you very much. Also thanks for Josh. I have to say that I'm really impressed with the speed of this list and dedication of the people who develop postgres. Twice I have asked a question on this list and twice I've got absolutely correct answer in less than one day - even when both of my questions have been kind of RTFM questions, had I just thought them out! The only two places I've got answers so fast have been Datavision and Inetd-software. > Mauri Sahlberg writes: >> If the following is executed in context, where the dynamic query returns >> data with every iteration everythin goes fine. If the the dynamic query >> returns nothing - bush becomes null and everything fails. I do not >> undestand why bush becomes null when the query returns nothing. > > If "latest" is null then the result of the series of concatenations is > also null. Perhaps what you really want is to assign to "latest" inside > the inner FOR-loop. > > regards, tom lane > >