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.
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
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера