Re: How to retrieve column names for tables with underscores - Mailing list pgsql-jdbc

From Thomas Kellerer
Subject Re: How to retrieve column names for tables with underscores
Date
Msg-id imgagk$h4a$1@dough.gmane.org
Whole thread Raw
In response to Re: How to retrieve column names for tables with underscores  (Kris Jurka <books@ejurka.com>)
Responses Re: How to retrieve column names for tables with underscores  (Maciek Sakrejda <msakrejda@truviso.com>)
Re: How to retrieve column names for tables with underscores  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Kris Jurka wrote on 24.03.2011 21:18:
>> Am Donnerstag, 24. M?rz 2011 schrieb Thomas Kellerer:
>>> backslash escape ("table1\_") but that didn't work.
>> IMHO it should be "table1\\_"?
>>
>
> The escape needed depends on the value of standard_conforming_strings. You should use this call to find the escape
needed:
>
> http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getSearchStringEscape()
>
That works perfectly.

Actually the fact that "it didn't work" right way was that I used replaceAll() instead of replace() somehow forgetting
thatreplaceAll() needs a regex... 

Interesting enough, the setting of standard_conforming_strings does not seem to affect this at all. Am I missing
something?

Thanks
Thomas

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: How to retrieve column names for tables with underscores
Next
From: Maciek Sakrejda
Date:
Subject: Re: How to retrieve column names for tables with underscores