Christian Ullrich <ch...@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

-- 
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