Re: Unexpected collation error in 9.1.1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unexpected collation error in 9.1.1
Date
Msg-id 17416.1317660273@sss.pgh.pa.us
Whole thread Raw
In response to Unexpected collation error in 9.1.1  (Christian Ullrich <chris@chrullrich.net>)
Responses Re: Unexpected collation error in 9.1.1
List pgsql-hackers
Christian Ullrich <chris@chrullrich.net> writes:
> I tried adding a not-null column in one step and got a collation
> error for a different column.

> itd=> alter table livedata add column pricechanged timestamp not null default current_timestamp;
> ERROR:  no collation was derived for column "whois_b" with collatable type citext
> TIP:  Use the COLLATE clause to set the collation explicitly.

That's pretty bizarre, but I can't reproduce it on the basis of the
supplied example:

regression=# create extension citext;
CREATE EXTENSION
regression=# create table foo (f1 int, f2 citext  default '          '::character varying);
CREATE TABLE
regression=# insert into foo values (1, 'one');
INSERT 0 1
regression=# insert into foo values (2, 'two');
INSERT 0 1
regression=# alter table foo add column pricechanged timestamp not null default current_timestamp;
ALTER TABLE

I tried adding UNIQUE and CHECK constraints too, and still no luck.
Are you sure you're using 9.1.1?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug with pg_ctl -w/wait and config-only directories
Next
From: Robert Haas
Date:
Subject: Re: Should we get rid of custom_variable_classes altogether?