Skip site navigation (1) Skip section navigation (2)

Re: Re: Escape Processing problems

From: "Thomas O'Dowd" <tom(at)nooper(dot)com>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Re: Escape Processing problems
Date: 2001-08-30 04:09:22
Message-ID: 20010830130922.M32410@beast.uwillsee.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hmmm, after a little more testing, I fixed a problem with backslashes.
New code attached.

Tom.

On Thu, Aug 30, 2001 at 11:46:16AM +0900, Thomas O'Dowd wrote:
> Hi all,
> 
> I found some time this morning to write and test a new EscapeSQL() method.
> I didn't make a patch for the driver yet as I'd like to hear some
> comments. It's a tad longer than the original code as it only replaces
> escape codes which appear in the SQL code and not inside strings.
> 
> It's attached as a separate java program which you can run to test with
> various strings. Let me know if you think it is okay. It seems to work
> with what I've tested it with.
> 
> Example:
> $ /usr/local/java/jdk1.3/bin/java esc "insert into test values ({d '2000-12-01'}, 'string of\\ \' {d mmmm}', {t '12:12:12'})"
> insert into test values ( '2000-12-01', 'string of\\ \' {d mmmm}', {t '12:12:12'})
> 
> Do you think we should expand it to handle the other codes like {t and {ts ?
> The old routine only handles {d.
> 
> Tom.
-- 
Thomas O'Dowd. - Nooping - http://nooper.com
tom(at)nooper(dot)com - Testing - http://nooper.co.jp/labs

In response to

Responses

pgsql-jdbc by date

Next:From: Ricardo PardiniDate: 2001-08-30 13:22:49
Subject: ? (question mark) characters
Previous:From: Thomas O'DowdDate: 2001-08-30 02:46:16
Subject: Re: Escape Processing problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group