Re: Problems with question marks in operators (JDBC, ECPG, ...) - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Problems with question marks in operators (JDBC, ECPG, ...)
Date
Msg-id 555669F2.6040406@dunslane.net
Whole thread Raw
In response to Re: Problems with question marks in operators (JDBC, ECPG, ...)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 05/15/2015 04:35 PM, Robert Haas wrote:
> I guess JDBC has the same problem as Perl and JavaScript here: ?
> signals a bind variable.  The next question is, why isn't there some
> escaping mechanism for that, like writing ?? or \? or something?


FTR, Perl's DBD::Pg lets you do this:
   $dbh->{pg_placeholder_dollaronly} = 1; # disable ? placeholders   $sth = $dbh->prepare(q{SELECT * FROM mytable WHERE
lseg1?# lseg2   AND name = $1});   $sth->execute('segname');
 

cheers

andrew





pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: KNN-GiST with recheck
Next
From: Andres Freund
Date:
Subject: Re: Final Patch for GROUPING SETS