pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Binary data in bytea field
4+ messages / 2 participants
[nested] [flat]

* Binary data in bytea field
@ 2002-03-23 18:17  Iklódi Lajos <il@mithrandir.hu>
  0 siblings, 1 reply; 4+ messages in thread

From: Iklódi Lajos @ 2002-03-23 18:17 UTC (permalink / raw)
  To: pgsql-sql

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Binary data in bytea field
@ 2002-03-23 18:48  Joe Conway <mail@joeconway.com>
  parent: Iklódi Lajos <il@mithrandir.hu>
  0 siblings, 1 reply; 4+ messages in thread

From: Joe Conway @ 2002-03-23 18:48 UTC (permalink / raw)
  To: Iklódi Lajos <il@mithrandir.hu>; +Cc: pgsql-sql

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






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Binary data in bytea field
@ 2002-03-23 23:18  Iklódi Lajos <il@mithrandir.hu>
  parent: Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Iklódi Lajos @ 2002-03-23 23:18 UTC (permalink / raw)
  To: Joe Conway <mail@joeconway.com>; +Cc: pgsql-sql

> 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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Binary data in bytea field
@ 2002-03-23 23:27  Joe Conway <mail@joeconway.com>
  parent: Iklódi Lajos <il@mithrandir.hu>
  0 siblings, 0 replies; 4+ messages in thread

From: Joe Conway @ 2002-03-23 23:27 UTC (permalink / raw)
  To: Iklódi Lajos <il@mithrandir.hu>; +Cc: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-03-23 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-23 18:17 Binary data in bytea field Iklódi Lajos <il@mithrandir.hu>
2002-03-23 18:48 ` Joe Conway <mail@joeconway.com>
2002-03-23 23:18   ` Iklódi Lajos <il@mithrandir.hu>
2002-03-23 23:27     ` Joe Conway <mail@joeconway.com>

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