From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mauri.Sahlberg@pretax.net
Cc: pgsql-admin@postgresql.org
Subject: Re: plpgsql: Bush becomes a null, can not execute null query
Date: Thu, 28 Aug 2003 09:33:17 -0400
Message-ID: <10442.1062077597@sss.pgh.pa.us> (raw)
In-Reply-To: <1062056068.19315.24.camel@taekwondo.intra.pretax.net>
References: <1062056068.19315.24.camel@taekwondo.intra.pretax.net>
Mauri Sahlberg <Mauri.Sahlberg@claymountain.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, Mauri.Sahlberg@pretax.net
Subject: Re: plpgsql: Bush becomes a null, can not execute null query
In-Reply-To: <10442.1062077597@sss.pgh.pa.us>
References: <1062056068.19315.24.camel@taekwondo.intra.pretax.net> <10442.1062077597@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox