Re: [HACKERS] PQescapeBytea* version for parameters

2007-07-11 Thread Bruce Momjian
Tom Lane wrote: > Gregory Stark <[EMAIL PROTECTED]> writes: > > Shouldn't it escape ' as \' and not '' if standard_conforming_strings is > > false? > > No. That's always worked and there's no reason to change it. '' is more standard than \' so we always use ''. -- Bruce Momjian <[EMAIL PROT

Re: [HACKERS] PQescapeBytea* version for parameters

2007-07-11 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Shouldn't it escape ' as \' and not '' if standard_conforming_strings is > false? No. That's always worked and there's no reason to change it. regards, tom lane ---(end of broadcast)-

Re: [HACKERS] PQescapeBytea* version for parameters

2007-07-11 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> Do we want something like this which provides a PQescapeByteaParam for >> escaping bytea strings before passing them as text-mode parameters in >> PQexecParam? > > Seems a lot easier and more efficient to just pa

Re: [HACKERS] PQescapeBytea* version for parameters

2007-07-09 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> Do we want something like this which provides a PQescapeByteaParam for >> escaping bytea strings before passing them as text-mode parameters in >> PQexecParam? > > Seems a lot easier and more efficient to just pa

Re: [HACKERS] PQescapeBytea* version for parameters

2007-07-08 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Do we want something like this which provides a PQescapeByteaParam for > escaping bytea strings before passing them as text-mode parameters in > PQexecParam? Seems a lot easier and more efficient to just pass out-of-line bytea parameters as binary mode.

[HACKERS] PQescapeBytea* version for parameters

2007-07-04 Thread Gregory Stark
Currently libpq provides a function to escape byteas to include directly in the query string. But if you're using PQexecParam you still need to do one layer of quoting but don't need to double the backslashes which PQescapeBytea does if you have standard_conforming_strings set off. Do we want som