Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 299F21337BF5 for ; Thu, 24 Mar 2011 18:42:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 70310-03 for ; Thu, 24 Mar 2011 21:42:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id EEB751337C00 for ; Thu, 24 Mar 2011 18:42:06 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q2sIA-0001qR-14 for pgsql-jdbc@postgresql.org; Thu, 24 Mar 2011 22:42:06 +0100 Received: from ppp-188-174-7-110.dynamic.mnet-online.de ([188.174.7.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Mar 2011 22:42:05 +0100 Received: from spam_eater by ppp-188-174-7-110.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Mar 2011 22:42:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: How to retrieve column names for tables with underscores Date: Thu, 24 Mar 2011 22:41:58 +0100 Lines: 22 Message-ID: References: <201103241618.32280.ml-tb@emagixx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp-188-174-7-110.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201103/48 X-Sequence-Number: 21603 Maciek Sakrejda wrote on 24.03.2011 22:02: >> Interesting enough, the setting of standard_conforming_strings does not seem >> to affect this at all. Am I missing something? > > Doesn't seem to affect what, exactly? The escape character returned by getSearchStringEscape() >It definitely affects how > backslashes are interpreted, and unless the current version of the > JDBC driver injects the 'E' escape syntax (with the 'E' prefix, > backslash escape sequences are interpreted regardless of the setting) > in a cavalier manner into the LIKE expression comparisons for > getColumns() (the one I have handy doesn't seem to), you should see > different behavior. Regardless of the setting of standard_conforming_strings passing \_ to getColumns() always works properly. See Kris' answer for details. Regards Thomas