Error in creating the backend query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

 


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux