From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christian Ullrich <chris(at)chrullrich(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unexpected collation error in 9.1.1 |
Date: | 2011-10-03 16:44:33 |
Message-ID: | 17416.1317660273@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christian Ullrich <chris(at)chrullrich(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-10-03 16:51:37 | Re: Should we get rid of custom_variable_classes altogether? |
Previous Message | Bruce Momjian | 2011-10-03 16:37:20 | Re: Bug with pg_ctl -w/wait and config-only directories |