vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, folks, We run into an issue on update query with timestamp in batch execution. It appears that following query triggers complaints about "syntax error at or about '{'". UPDATE testtable SET time = {ts '2007-07-26 10:11:12'} where id = 1; The same time stamp escape sequence worked fine as part of where clause in SELECT query and as values in INSERT query. What we do essentially is the following: stmt.addBatch("UPDATE testtable SET time={ts '2007-07-26 10:11:12'} WHERE id = 1"); stmt.addBatch(....); .... stmt.executeBatch(); An exception is thrown from executeBatch() call with the complaint of syntax error. It appeared that timestamp value is not converted properly before the query was sent to the database. We have confirmed the issue with following systems: Driver 8.2.504 and Postgresql 8.1.4 Driver 8.2.505 and Postgresql 8.2.4 Could this issue be verified and fixed? Thanks much. Hui ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| ||||
| On Thu, 26 Jul 2007, Hui Ye wrote: > We run into an issue on update query with timestamp in batch execution. > It appears that following query triggers complaints about "syntax error > at or about '{'". > UPDATE testtable SET time = {ts '2007-07-26 10:11:12'} where id = 1; > Fixed in CVS for 8.0, 8.1, 8.2 and HEAD. I will put out a new series of driver releases this weekend. Kris Jurka ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |