Re: putting binary data in a char field?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Snyder <snyder(at)roguewave(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: putting binary data in a char field?
Date: 2004-06-18 16:23:06
Message-ID: 21408.1087575786@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Snyder <snyder(at)roguewave(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-06-18 16:37:38 Re: Postgres "invalid page header"
Previous Message Bruno Wolff III 2004-06-18 16:15:25 Re: 7.4's INFORMATION_SCHEMA.Columns View