Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D3379B6063E for ; Sun, 5 Jun 2011 16:22:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 26525-04 for ; Sun, 5 Jun 2011 19:22:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 4113DB6063A for ; Sun, 5 Jun 2011 16:22:08 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p55JM7lD016045 for ; Sun, 5 Jun 2011 19:22:07 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p55JM7RF016044; Sun, 5 Jun 2011 19:22:07 GMT (envelope-from www) Date: Sun, 5 Jun 2011 19:22:07 GMT Message-Id: <201106051922.p55JM7RF016044@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6053: Can't do DISTINCT on citext column From: "Regina" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201106/49 X-Sequence-Number: 30428 The following bug has been logged online: Bug reference: 6053 Logged by: Regina Email address: lr@pcorp.us PostgreSQL version: 9.1beta1 Operating system: Windows Description: Can't do DISTINCT on citext column Details: I have a table I created like this: -- With and without the COLLATE in there I get the same error. CREATE TABLE test ( fullname citext COLLATE pg_catalog."POSIX", ); INSERT INTO test(fullname) VALUES('test1'),('test2'); When I do a: SELECT DISTINCT fullname FROM test; or a SELECT DISTINCT fullname COLLATE pg_catalog."POSIX" FROM test; It gives error: ERROR: could not determine which collation to use for lower() function HINT: Use the COLLATE clause to set the collation explicitly.