Re: [NOVICE] LibPQ, C, BLOB or BYTEA

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [NOVICE] LibPQ, C, BLOB or BYTEA
Дата
Msg-id 13714.1508767418@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [NOVICE] LibPQ, C, BLOB or BYTEA  (Merlin Moncure <mmoncure@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: [NOVICE] LibPQ, C, BLOB or BYTEA
Следующее
От: Ruslan R. Laishev
Дата:
Сообщение: Re: [NOVICE] LibPQ, C, BLOB or BYTEA