Re: putting binary data in a char field? - Mailing list pgsql-general

From Tom Lane
Subject Re: putting binary data in a char field?
Date
Msg-id 21408.1087575786@sss.pgh.pa.us
Whole thread Raw
In response to putting binary data in a char field?  (Ron Snyder <snyder@roguewave.com>)
List pgsql-general
Ron Snyder <snyder@roguewave.com> writes:
> That's all just background for my real question-- is there anything in the
> standards (or elsewhere) that says you can't put binary(**) data into a char
> field?  When I changed the field to a bytea, processing time was
> significantly reduced.

bytea is the right thing.  char will not support null (zero) bytes in
the data, and you may have character-set-encoding issues as well.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: 7.4's INFORMATION_SCHEMA.Columns View
Next
From: Duane Lee - EGOVX
Date:
Subject: Re: virtual fields on VIEW?