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

From: Ropel <ropel(at)ropel(dot)it>
To: ketan shah <ketan_dba(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to insert '\\' in postgres database using java
Date: 2005-07-15 14:20:52
Message-ID: 42D7C644.50702@ropel.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If, as the name of the column suggests, the backslash is used for
pathnames, why don't you bypass the problem by using normal slash (I.E:
"path/to/my/file")? It works well
with new windows versions and, of course, unix-style pathnames....

Hope this helps, Roberto

ketan shah wrote:

> Hi,
> All,
> My name is ketan, i have problem in postgres db insert..
> Here is my problem.
> i have created table like..
> 1) Create table tab1(usr_id varchar(15), usr_name
> varchar(20),usr_filename_pattern varchar(1024));
> 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
> 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..
> ketan
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-07-15 14:28:00 Re: How to create unique constraint on NULL columns
Previous Message John D. Burger 2005-07-15 14:06:29 Re: Case insensitive unique constraint