Skip site navigation (1) Skip section navigation (2)

Storing binary data in a column

From: Yamini Sharma <yamini(at)w-o-i(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Storing binary data in a column
Date: 2000-05-17 12:43:47
Message-ID: (view raw or whole thread)
Lists: pgsql-sql

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.



pgsql-sql by date

Next:From: Richard J KuhnsDate: 2000-05-17 13:50:27
Subject: Re: Question about databases in alternate locations...
Previous:From: Alex GuryanowDate: 2000-05-17 07:51:49
Subject: lower() for varchar data by creating an index

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group