Re: When inserting '\' the insert fails. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: When inserting '\' the insert fails.
Date
Msg-id 24542.995753907@sss.pgh.pa.us
Whole thread Raw
In response to When inserting '\' the insert fails.  (pgsql-bugs@postgresql.org)
List pgsql-bugs
pgsql-bugs@postgresql.org writes:
> When inserting  '\' the insert fails.

Your examples work fine for me:

regression=# create table t3 (tt text, date timestamp);
CREATE
regression=# INSERT INTO t3 ( tt,date )
regression-# VALUES ( 'aaaaaaa ''\\'' bbbbbbbb','2000-10-30 21:18:05' );
INSERT 5814810 1
regression=# INSERT INTO t3 ( tt,date )
regression-# VALUES ( 'eqwehqw ''\\'' dsdsa','2000-10-30') ;
INSERT 5814811 1
regression=# select * from t3;
          tt          |          date
----------------------+------------------------
 aaaaaaa '\' bbbbbbbb | 2000-10-30 21:18:05-05
 eqwehqw '\' dsdsa    | 2000-10-30 00:00:00-05
(2 rows)

I suspect the problem is somewhere in your application code.  You might
try turning on query logging at the postmaster to see what's actually
being transmitted to the backend by the application.

            regards, tom lane

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: When inserting '\' the insert fails.
Next
From: "And. Andruikhanov"
Date:
Subject: timestamp (minor bug)