From: | "Benjamin Krajmalnik" <kraj(at)illumen(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Error in creating the backend query |
Date: | 2009-07-29 17:49:43 |
Message-ID: | F4E6A2751A2823418A21D4A160B689883FCC6A@fletch.stackdump.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
PostgreSQL 8.3.7 running on FreeBSD.
The following query:
update tblksalerts
set cleartime = x_cleartime,
laststatusid = x_statusid,
lastreplytext = x_replytxt,
lasttesttime = x_testtime,
lasteventsource = x_eventsource,
lasteventid = x_eventid,
replyval = x_replyval,
trend = mytrend,
alertoccurrence = testcount
where ksalertssysid = alertsrecord.ksalertssysid;
being issued via a pl/pgsql stored procedure is being translated by the
backend as follows:
update tblksalerts set cleartime = '2009-07-29 10:49:50'::TIMESTAMP,
laststatusid = 7::INTEGER, lastreplytext = '0'::VARCHAR, lasttesttime =
'2009-07-29 10:49:50'::TIMESTAMP, lasteventsource is NULL::VARCHAR,
lasteventid is NULL::INTEGER, replyval = 0::REAL, trend = ''::varchar (
1 ), alertoccurrence = 0::integer where ksalertssysid = 1737078
and is generating a syntax error: syntax error at or near "is" at
character 192
Please note the "lasteventsource is null" instead of "lasteventsource =
null" which is being generated when the value of x_eventsource is null.
We have implemented a workaround by setting the value to a blank string,
but I believe this is a problem nonetheless.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Monnerie | 2009-07-29 19:03:57 | Re: Off-topic - Hardware recommendation |
Previous Message | Kevin Grittner | 2009-07-29 17:28:11 | Re: Off-topic - Hardware recommendation |