Re: PQexecParams - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: PQexecParams
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A7649@Herge.rcsinc.local
Whole thread Raw
In response to PQexecParams  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
> "Merlin Moncure" <merlin.moncure@rcsonline.com> 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 string.
> > However the server still may still need to interpret the data for
> > storage...meaning for the bytea type at least you have to do octal
> > encoding (at least that's what I do, I'd like nothing better than to
be
> > corrected on this point).
>
> Not if you send the bytea parameter in binary format.  If you send it
in
> text format that's true.

Whoops!  In fact, my ISAM driver does exactly this.  However, it is
still interpreting octal codes returned from the server.  This is
because liqpq's restriction to ask for the result in all text/all
binary.  However IIRC this is not a restriction of the protocol.

Merlin


pgsql-hackers by date:

Previous
From: "Moran.Michael"
Date:
Subject: contrib/pgcrypto
Next
From: David Pradier
Date:
Subject: Re: Erratic error message "ERROR: column "id_compte" does