Skip site navigation (1) Skip section navigation (2)

Re: string is sometimes null ?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: string is sometimes null ?
Date: 2004-09-29 16:44:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Wed, 29 Sep 2004, Graeme Hinchliffe wrote:

> 	The RADIUS server is reporting problems when trying to write START of
> accounting entries, and the error given is:
> ERROR:  cannot EXECUTE a null querystring CONTEXT:  PL/pgSQL function
> "radacct_trig" line 43 at open
> The lines its refering to are:
> --- START ---
> str:=''SELECT
> username,year_of_jan,current_in,current_out,current_start,last_update,m''||monthcurr||''_in
> AS monthin,m''||monthcurr||''_out AS monthout
>   FROM customer_stats WHERE username=''''''||username||'''''''';

If monthcurr or username are null, the above will be null.
Anything || NULL => NULL.

In response to


pgsql-general by date

Next:From: Shelby CainDate: 2004-09-29 16:53:37
Subject: Re: PostgreSQL Installation Question
Previous:From: Tom LaneDate: 2004-09-29 16:28:02
Subject: Re: Composite Type Argument Construction to a Function

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group