Search Postgresql Archives

Re: how to insert '\\' in postgres database using java

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

 



Ketan,

Please reply to the list as well so others have the opportunity to help you. And please don't top-post.

On Jul 16, 2005, at 12:31 AM, ketan shah wrote:

 but if i update more then two times then it remove all '\';

 and finally it returns 'Adddd'  or 'Bdddd'...

But i want 'A\\d\\d\\d\\d' and 'B\\d\\d\\d\\d' after n number of updates.

i.e. no change in inserted value after n numbers of updates for that record.

If you don't change change the values of the usr_filename_pattern in the update (in the SET clause), those values should not change.

test=# select * from tab1;
usr_id | usr_name | usr_filename_pattern
--------+----------+----------------------
A      | Mr. A    | A\d\d\d\d
A      | Mr. B    | A\\d\\d\\d\\d
(2 rows)

test=# update tab1 set usr_name = 'Mr. C' where usr_id = 'A';
UPDATE 2
test=# select * from tab1;
usr_id | usr_name | usr_filename_pattern
--------+----------+----------------------
A      | Mr. C    | A\d\d\d\d
A      | Mr. C    | A\\d\\d\\d\\d

I suspect there is some additional SQL code being executed by your Java application. You may want to enable query logging and check the PostgreSQL logs to see exactly what queries are being executed.

Michael Glaesemann
grzm myrealbox com


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux