From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: How to retrieve column names for tables with underscores
Date: Thu, 24 Mar 2011 21:45:13 +0100
Message-ID: <imgagk$h4a$1@dough.gmane.org> (raw)
In-Reply-To: <alpine.BSO.2.00.1103241615460.4390@leary.csoft.net>
References: <imfg0q$481$1@dough.gmane.org>
<201103241618.32280.ml-tb@emagixx.de>
<alpine.BSO.2.00.1103241615460.4390@leary.csoft.net>
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 that replaceAll() 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: How to retrieve column names for tables with underscores
In-Reply-To: <imgagk$h4a$1@dough.gmane.org>
References: <imfg0q$481$1@dough.gmane.org> <201103241618.32280.ml-tb@emagixx.de> <alpine.BSO.2.00.1103241615460.4390@leary.csoft.net> <imgagk$h4a$1@dough.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox