[HACKERS] PQexecParams() returns PGRES_COMMAND_OK for empty query

2009-01-08 Thread Tom Lane
While checking out Rushabh Lathia's recent report I noticed $subject. This is inconsistent because PQexec() returns PGRES_EMPTY_QUERY. Is it something we should fix, or leave well enough alone on backward compatibility grounds? The cause seems to be that the backend (correctly) returns a NoData re

Re: [HACKERS] PQexecParams

2005-03-16 Thread Merlin Moncure
> "Merlin Moncure" <[EMAIL PROTECTED]> writes: > >> Even binary data? ie. You could upload a binary string straight into > >> PQexecParams with no octal conversion? > > > Well, what it means you do not have to escape data at the protocol level > > you don't have to be concerned about formatting t

Re: [HACKERS] PQexecParams

2005-03-16 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: >> Even binary data? ie. You could upload a binary string straight into >> PQexecParams with no octal conversion? > Well, what it means you do not have to escape data at the protocol level > you don't have to be concerned about formatting the query str

Re: [HACKERS] PQexecParams

2005-03-16 Thread Merlin Moncure
> >>Will PQexecParams automatically escape bytea data as it goes in, or must > >>one run it through PQescapeBytea first? > > > > Neither. The data does not need escaping (assuming you pass it as a > > parameter, of course.) > > Even binary data? ie. You could upload a binary string straight into

Re: [HACKERS] PQexecParams

2005-03-15 Thread Christopher Kings-Lynne
Will PQexecParams automatically escape bytea data as it goes in, or must one run it through PQescapeBytea first? Neither. The data does not need escaping (assuming you pass it as a parameter, of course.) Even binary data? ie. You could upload a binary string straight into PQexecParams with no o

Re: [HACKERS] PQexecParams

2005-03-15 Thread Alvaro Herrera
On Tue, Mar 15, 2005 at 02:02:58PM +0800, Christopher Kings-Lynne wrote: > Will PQexecParams automatically escape bytea data as it goes in, or must > one run it through PQescapeBytea first? Neither. The data does not need escaping (assuming you pass it as a parameter, of course.) -- Alvaro Her

[HACKERS] PQexecParams

2005-03-14 Thread Christopher Kings-Lynne
Will PQexecParams automatically escape bytea data as it goes in, or must one run it through PQescapeBytea first? Chris ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatype