Re: Help needed with standard_conforming_strings
"David E. Wheeler" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
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. Best, David