Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE

From: Evan Carroll <me(at)evancarroll(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE
Date: 2012-05-10 23:03:52
Message-ID: CAAiePB6q7P9yc2Ctbvpctqy8ounTYKaoPqGBfTnxv9i1rav3rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Also see whether you can reproduce the error in a fresh database.
> I continue to think the problem is an incorrect collation value in
> some system catalog entry; if that's it, nobody will be able to
> reproduce it.  You might try checking to see that there are no
> un-updated rows matching those fixup queries.

I've been able to reproduce it in a fresh database. This is a PSQL
script 2a and 2b will fail.

\echo CREATING DOMAIN footype

CREATE DOMAIN footype AS citext;

\echo [1a] CREATING TABLE tablefoo_before (contains columns bar, type footype)

CREATE TABLE tablefoo_before ( bar footype );

\echo [1b] CREATING TEMP TABLE trash AS SELECT * FROM tablefoo_before

CREATE TEMP TABLE trash AS SELECT * FROM tablefoo_before ;

\echo RUNING PATCH TO UPDATE citext

UPDATE pg_catalog.pg_type SET typcollation = 100
WHERE oid = 'citext'::pg_catalog.regtype;

UPDATE pg_catalog.pg_attribute SET attcollation = 100
WHERE atttypid = 'citext'::pg_catalog.regtype;

\echo [2a] CREATING TABLE tablefoo_after (contains columns bar, type footype)

CREATE TABLE tablefoo_after ( bar footype );

\echo [2b] CREATING TEMP TABLE trash2 AS SELECT * FROM tablefoo_before

CREATE TEMP TABLE trash2 AS SELECT * FROM tablefoo_before ;

--
Evan Carroll - me(at)evancarroll(dot)com
System Lord of the Internets
web: http://www.evancarroll.com
ph: 281.901.0011

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Evan Carroll 2012-05-10 23:08:19 Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE
Previous Message Tom Lane 2012-05-10 22:12:14 Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE