Re: BUG #6259: Collation Error with Citext fields
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #6259: Collation Error with Citext fields |
| Дата | |
| Msg-id | 21435.1318893979@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #6259: Collation Error with Citext fields ("Stan S" <ssantiago@adinfocenter.com>) |
| Список | pgsql-bugs |
"Stan S" <ssantiago@adinfocenter.com> writes:
> shard_1=# CREATE TABLE users (nickname CITEXT PRIMARY KEY,pass TEXT NOT
> NULL);
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey"
> for table "users"
> shard_1=# INSERT INTO users VALUES ( 'larry', 'aaa' );
> INSERT 0 1
> shard_1=# INSERT INTO users VALUES ( 'Tom', 'bbb' );
> ERROR: could not determine which collation to use for string comparison
> HINT: Use the COLLATE clause to set the collation explicitly.
Hmm, I can't replicate this here ...
> shard_1=# CREATE TABLE users (nickname CITEXT COLLATE "C" PRIMARY KEY,pass
TEXT NOT NULL);
> ERROR: collations are not supported by type citext
This suggests strongly that you're using a 9.0-or-earlier citext
installation that you've not upgraded to 9.1. If that's the right
guess, you need to do CREATE EXTENSION citext FROM unpackaged
to fix it.
regards, tom lane
В списке pgsql-bugs по дате отправления: