Re: [ADMIN] plpgsql: Bush becomes a null, can not execute null query

2003-08-28 Thread Oleg Bartunov
On Thu, 28 Aug 2003, Josh Goldberg wrote: > Concatenating a null value makes the string null. try: > SELECT 'foo'||NULL||'bar'; > > Just add a condition to check rivi.suoritus for null before making an > assignment. or better use coalesce > > > > Mauri Sahlberg wrote: > > >returns nothing - bus

Re: [ADMIN] plpgsql: Bush becomes a null, can not execute null query

2003-08-28 Thread Josh Goldberg
Concatenating a null value makes the string null. try: SELECT 'foo'||NULL||'bar'; Just add a condition to check rivi.suoritus for null before making an assignment. Mauri Sahlberg wrote: returns nothing - bush becomes null and everything fails. I do not undestand why bush becomes null when the

Re: [ADMIN] plpgsql: Bush becomes a null, can not execute null query

2003-08-28 Thread Tom Lane
Mauri Sahlberg <[EMAIL PROTECTED]> 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