Re: [NOVICE] LibPQ, C, BLOB or BYTEA - Mailing list pgsql-novice

From Tom Lane
Subject Re: [NOVICE] LibPQ, C, BLOB or BYTEA
Date
Msg-id 13714.1508767418@sss.pgh.pa.us
Whole thread Raw
In response to Re: [NOVICE] LibPQ, C, BLOB or BYTEA  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-novice
Merlin Moncure <mmoncure@gmail.com> writes:
> On Mon, Oct 23, 2017 at 7:00 AM, Ruslan R. Laishev <zator@yandex.ru> wrote:
>> Is there a way to pass BYTEA values w/o formating to escape/hex binary ASCII
>> strings from C to plpqsql stored function ?

> From a C client application?  Yes, you need to use the binary wire format.

Yeah, specifically see PQexecParams() or one of its sibling functions.
You need to execute some command like "SELECT myfunc($1::bytea)" and
then pass the parameter value in binary format.
        regards, tom lane


--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

pgsql-novice by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: [NOVICE] LibPQ, C, BLOB or BYTEA
Next
From: Ruslan R. Laishev
Date:
Subject: Re: [NOVICE] LibPQ, C, BLOB or BYTEA