From: Joe Conway <mail@joeconway.com>
To: Iklódi Lajos <il@mithrandir.hu>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Binary data in bytea field
Date: Sat, 23 Mar 2002 15:27:06 -0800
Message-ID: <3C9D0F4A.5050101@joeconway.com> (raw)
References: <3C9CC6CE.B269A510@mithrandir.hu>
<3C9CCE10.3090703@joeconway.com>
<3C9D0D3F.68EF7CD@mithrandir.hu>
Iklódi Lajos wrote:
>>Iklódi Lajos wrote:
>>
>>>I have a table with field of tyte bytea. I'm reading this table with C,
>>>libpq.
>>>The result is a string, with octal groups, like '\200'.
>>>Is it possible to get data as it is, every byte in one byte?
>>>Thanks
>>>
>>
>>Sure -- just use a binary cursor.
>>
>>HTH,
>>
>>Joe
>
>
> Thanks, really it is in docs.
> How can I make binary updates?
>
> Lajos
>
See:
http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/libpq-exec.html
section 1.3.3 "Escaping binary strings for inclusion in SQL queries".
Joe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com, il@mithrandir.hu
Subject: Re: Binary data in bytea field
In-Reply-To: <3C9D0F4A.5050101@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox