Port Bug Report: Parse error for insert statement when using jdbc.
От | Unprivileged user |
---|---|
Тема | Port Bug Report: Parse error for insert statement when using jdbc. |
Дата | |
Msg-id | 199905072248.SAA47256@hub.org обсуждение исходный текст |
Список | pgsql-ports |
============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Shashi Kumar Your email address : menonsk@hotmail.com Category : runtime: back-end Severity : critical Summary: Parse error for insert statement when using jdbc. System Configuration -------------------- Operating System : Red Hat Linux 5.2 PostgreSQL version : 6.2.1 Compiler used : jdk 1.1.7 Hardware: --------- Linux 2.0.36 #1 Tue Jun 30 08:32:04 CDT 1998 i686 unknown Versions of other tools: ------------------------ -------------------------------------------------------------------------- Problem Description: -------------------- My database table has one of the attributes scandata varchar(2000) I have to insert a String into this column. This string can have all Ascii character from ascii(33) and above. The String looks something like this : BZT597 A29905071439149905071439 14 POS 0000 01T#A<$G0507 POSS0100 691533B000340600 14391439<"!T** #B(!!1(&$0507(%$HNBA(#%6 9153(+#BSC(R$1439(,''wxyz(S$1439(.!6<F+E 221546264B<H!2<I-POS Test Site(/,806287 701919(0!1>*$0200** ** When I insert this string to the table through the psql prompt, it gets inserted.(I only have to take care of the single quotes in the string). I am using JDBC to connect to (jdbc:postgresql:) and try to insert the same string. I get an Error java.sql.SQLException: WARN:parser: parse error at or near "" . I tried tracking the source of this error and found that the input SQL string is being written to the Socket in PG_Stream.java file. The return Message that it receives give the error. So I think there is some parsing problem at the backend server. Remember the same command that I use to insert this string works through psql prompt. If u can help me out, I would appreciate that. Thanks Shashi -------------------------------------------------------------------------- Test Case: ---------- I am using the following string in executeUpdate(String); INSERT INTO scandata VALUES ('806287701871', '0200', 'POD', '1999:5:7:14:39:14', '1', 'Posting Error- No Scan Posted', 'BZT597 A2990507143914990507143914 POS 000001T#A<$G0507 POSS0100 606053B00034060014391439<"!T**#B(!!1(&$0507(%$OLVA(#%60605(+#STA(R$1439(,''wxyz(S$1439(.!6<F+E221546264B<H!3<I-POS Test Site(/,806287701871(0!1>*$0200****'); -------------------------------------------------------------------------- Solution: --------- --------------------------------------------------------------------------
В списке pgsql-ports по дате отправления: