Re: store in bytea - Mailing list pgsql-general

From Tom Lane
Subject Re: store in bytea
Date
Msg-id 2905.998659697@sss.pgh.pa.us
Whole thread Raw
In response to Re: store in bytea  ("Ben-Nes Michael" <miki@canaan.co.il>)
Responses Re: store in bytea  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
List pgsql-general
"Ben-Nes Michael" <miki@canaan.co.il> writes:
> On the theoretical issue, can I use TEXT field to store binary ?

TEXT will not handle null (zero) bytes.  If you are using a multibyte
character set, it will likely also do the wrong thing with byte
sequences that are illegal or incomplete multibyte characters.

Use BYTEA if you want to store arbitrary byte sequences --- that's what
it's for.

            regards, tom lane

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: valid NULL DATE value
Next
From: Denis Gasparin
Date:
Subject: Re: BIGINT datatype and Indexes Failure