Re: plpgsql: Bush becomes a null, - Mailing list pgsql-admin

From Mauri Sahlberg
Subject Re: plpgsql: Bush becomes a null,
Date
Msg-id 1824.10.0.0.10.1062097056.squirrel@www.claymountain.com
Whole thread Raw
In response to Re: plpgsql: Bush becomes a null, can not execute null query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
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 <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
>
>


pgsql-admin by date:

Previous
From: Josh Goldberg
Date:
Subject: Re: plpgsql: Bush becomes a null, can not execute null query
Next
From: Oleg Bartunov
Date:
Subject: Re: plpgsql: Bush becomes a null, can not execute null query