Re: LibPQ, C, BLOB or BYTEA

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: "Ruslan R(dot) Laishev" <zator(at)yandex(dot)ru>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: LibPQ, C, BLOB or BYTEA
Date: 2017-10-23 21:08:13
Message-ID: CAHyXU0xY3qGqZVE67MmvXKYi9GHnADC7AQzBQ3M6KeRqtdHzUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Oct 23, 2017 at 9:18 AM, Ruslan R. Laishev <zator(at)yandex(dot)ru> wrote:
> The question was "How To?". :-)
> I looking for something like follows:
> ...
> char __data_bytea[128];
>
>
> RAND_bytes(__data_bytea, sizeof(__data_byte));
> ...
> argv[0] = __data_bytea;
> argl[0] = sizeof(__data_bytea);
>
> ...
> PQexecPrepared ( ... argv, argl , ...);

check out libpqtypes -- it does exactly what you want.

merlin

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bee.Lists 2017-10-23 23:22:38 New Version Errors
Previous Message Stephen Froehlich 2017-10-23 19:23:04 Issues shutting down PostgreSQL 10 cleanly