Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-03-06 Thread Peter Eisentraut
On ons, 2011-03-02 at 16:00 -0500, Tom Lane wrote: That seems like a 100% arbitrary distinction between base types and domains, to the detriment of base types, which is odd since in most other ways base types are much more flexible than domains. Well, base types don't support check constraints

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-03-02 Thread Peter Eisentraut
On tis, 2011-03-01 at 16:31 -0500, Tom Lane wrote: 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

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-03-02 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-03-01 at 16:31 -0500, Tom Lane wrote: 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

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-03-01 Thread Peter Eisentraut
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

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-03-01 Thread Tom Lane
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

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-02-18 Thread Peter Eisentraut
On tor, 2011-02-17 at 17:50 -0500, Tom Lane wrote: What are we going to do to allow the citext update script to fix this? I see no sign that ALTER TYPE can fix it (and am unsure that we'd want to add such a feature, particularly not right now). How would this normally be handled if a type

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-02-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tor, 2011-02-17 at 17:50 -0500, Tom Lane wrote: Is it time for a direct UPDATE on the pg_type row? If so, to what? I see pg_type.typcollation is supposed to be an OID, so how the heck does one map a bool CREATE TYPE parameter into the catalog

[HACKERS] ALTER TYPE COLLATABLE?

2011-02-17 Thread Tom Lane
I observe the following discrepancy between the 9.0 and 9.1 citext install scripts: *** *** 52,58 STORAGE= extended, -- make it a non-preferred member of string type category CATEGORY = 'S', ! PREFERRED = false ); -- --- 49,56

Re: [HACKERS] ALTER TYPE COLLATABLE?

2011-02-17 Thread David E. Wheeler
On Feb 17, 2011, at 2:50 PM, Tom Lane wrote: I observe the following discrepancy between the 9.0 and 9.1 citext install scripts: *** *** 52,58 STORAGE= extended, -- make it a non-preferred member of string type category CATEGORY = 'S', !