Re: Help needed with standard_conforming_strings

Andrew Dunstan <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>

David E. Wheeler wrote:
> On May 9, 2008, at 06:48, Greg Sabino Mullane wrote:
>
>> The end goal is to implement a $dbh->quote() that emulates the behavior
>> of PG's quote_literal while still sticking to the DBI API, and I 
>> think the
>> current solution (e.g. what I committed last night) is probably the
>> best solution.
>
> "And if you don't like it, use prepared statements with placeholders, 
> instead. You're better off doing so, anyway."
>
> FWIW, I hacked the Rails PostgreSQL driver's quote_string method to 
> prepend an "E" to a string if it contained a backslash. Saved me a 
> shitload of warnings.
>
>

As I told you in Portland, all you really had to do was to set 
escape_string_warnings = false.

cheers

andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.