Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8325CB5DBEE for ; Mon, 17 Oct 2011 20:26:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 64893-08 for ; Mon, 17 Oct 2011 23:26:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 640EEB5DBFD for ; Mon, 17 Oct 2011 20:26:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9HNQJSw021436; Mon, 17 Oct 2011 19:26:19 -0400 (EDT) To: "Stan S" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6259: Collation Error with Citext fields In-reply-to: <201110172135.p9HLZLZn000672@wwwmaster.postgresql.org> References: <201110172135.p9HLZLZn000672@wwwmaster.postgresql.org> Comments: In-reply-to "Stan S" message dated "Mon, 17 Oct 2011 21:35:21 +0000" Date: Mon, 17 Oct 2011 19:26:19 -0400 Message-ID: <21435.1318893979@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/151 X-Sequence-Number: 31421 "Stan S" 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