pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Storing binary data in a column
2+ messages / 2 participants
[nested] [flat]

* Storing binary data in a column
@ 2000-05-17 12:43 Yamini Sharma <yamini@w-o-i.com>
  2000-05-17 15:22 ` Re: Storing binary data in a column Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Yamini Sharma @ 2000-05-17 12:43 UTC (permalink / raw)
  To: pgsql-sql


Hi,

I want to know, how to store binary data in a table, (varchar,
text etc do not work if the data contains nulls embeded in it).

The data type i would like to store is unsigned char *, and it may have
nulls or any other special charecters in it. 
INSERT statement works by escaping the special chars using \, but i
could not retreive the results using libpq. The values terminates on a
'\0' character. Is there any other datatype which may be used to store a
binary data string. 

Please reply to my email-id as i am not a member of the list.

regards,
Yamini.




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

* Re: Storing binary data in a column
  2000-05-17 12:43 Storing binary data in a column Yamini Sharma <yamini@w-o-i.com>
@ 2000-05-17 15:22 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2000-05-17 15:22 UTC (permalink / raw)
  To: Yamini Sharma <yamini@w-o-i.com>; +Cc: pgsql-sql

Yamini Sharma <yamini@w-o-i.com> writes:
> Is there any other datatype which may be used to store a
> binary data string. 

bytea (byte array) is intended to handle this, but I seem to recall
some complaints that its I/O representation is a pain to deal with.
Haven't tried to use it myself.

			regards, tom lane



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


end of thread, other threads:[~2000-05-17 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-17 12:43 Storing binary data in a column Yamini Sharma <yamini@w-o-i.com>
2000-05-17 15:22 ` Tom Lane <tgl@sss.pgh.pa.us>

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