Re: Catastrophic changes to PostgreSQL 8.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org, bacula-devel <bacula-devel(at)lists(dot)sourceforge(dot)net>, bacula-users <bacula-users(at)lists(dot)sourceforge(dot)net>, Kern Sibbald <kern(at)sibbald(dot)com>
Subject: Re: Catastrophic changes to PostgreSQL 8.4
Date: 2009-12-03 15:46:54
Message-ID: 9441.1259855214@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> As others have said; BYTEA is probably the best datatype for you to
> use. The encoding of BYTEA literals is a bit of a fiddle and may need
> some changes, but it's going to be much more faithful to your needs of
> treating the filename as an opaque blob of data.

bytea might be theoretically the best choice, but the fact remains that
99% of the entries will be text that's readable in the user's encoding
(whatever that is). bytea will just be a serious PITA because of its
escaping issues. Also, the fact that 8.5 may change to hex display by
default will make bytea even more of a PITA for mostly-text data.
So I think Bacula's choice to use sql_ascii with text columns is
entirely defensible.

What concerns me is the claim that PG made a database with some
arbitrary parameters after having rejected a now-considered-invalid
command. I frankly do not believe that, but if it did happen it's
a *serious* bug that requires investigation.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-12-03 15:49:46 Re: numeric cast oddity
Previous Message Adrian Klaver 2009-12-03 15:42:58 Re: Catastrophic changes to PostgreSQL 8.4

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-03 15:51:03 Re: Catastrophic changes to PostgreSQL 8.4
Previous Message Adrian Klaver 2009-12-03 15:42:58 Re: Catastrophic changes to PostgreSQL 8.4