Peter Eisentraut <pete...@gmx.net> writes:
> On fre, 2011-02-18 at 11:45 -0500, Tom Lane wrote:
>> While testing a fix for this, I observe that pg_dump is entirely
>> broken on the subject, because it fails to dump anything at all about
>> the typcollation property when dumping a base type.

> This is now fixed.

>> I also rather wonder
>> exactly what pg_dump would dump to restore a value of
>> pg_type.typcollation that's not either 0 or 100.

> It does what pg_dump does with other unrecognized or invalid type
> attributes: it ignores them.

I can't say that this makes me think any better of the design here.
If a boolean true/false is a sufficient representation of a type's
collation property, why isn't the column in pg_type just a boolean?
If the idea of storing an OID is to allow reference to a choice of
collations, why are we painting ourselves into a corner by dumping
it as a boolean?  ISTM there are exactly two sane choices here:

1. Change the pg_type column to a boolean.

2. Change the CREATE TYPE command's representation of the COLLATION
property to be the name of the referenced collation.

If there is a reason why the current design is actually correct,
please explain it.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to