Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to insert '\\' in postgres using java

Status
Not open for further replies.

ketandba

Programmer
Nov 15, 2004
38
US
Hi,
all,
i have problem in postgres db insert..

Here is my problem.
i have created table like..
1)
Code:
  Create table tab1(usr_id varchar(15), usr_name varchar(20),usr_filename_pattern varchar(1024));
Code:
      insert table tab1 values('A','Mr. A','A\\d\\d\\d\\d');
Record is successfully inserted But when i retrieve using java program..
select * from tab1;
The output is 'A', 'Mr. A', 'A\d\d\d\d' (means it escapeing '\')
Also when i update the record
Code:
     update tab1 set usr_name='Mr. B' where usr_id='A';
and after succefully updation when i try to retrieve record by
select * from tab1;
output is 'A','Mr. B', 'Adddd' (means it escapeing '\' again)


My question :

After updation how i get

'A', 'Mr. B', 'A\\d\\d\\d\\d'

i.e. not escapeing '\\'.
I am using postgres 7.4.6 and java 1.4.

pl. help me out...

Thanks in advanced..
[\u]
ketan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top