Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B3D94B5D803 for ; Thu, 16 Jun 2011 16:42:33 -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 99078-06 for ; Thu, 16 Jun 2011 19:42:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pv0-f174.google.com (mail-pv0-f174.google.com [74.125.83.174]) by mail.postgresql.org (Postfix) with ESMTP id 148F5B5DBC1 for ; Thu, 16 Jun 2011 16:42:26 -0300 (ADT) Received: by pvg12 with SMTP id 12so1271360pvg.19 for ; Thu, 16 Jun 2011 12:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8mV47TjjgsrzVAIFMoM7MNesQpe2KQMq0VZIT7OJKPw=; b=lXFpWVbdB1VqGXZGOAs6ws/HMnbKg/8ESTl2Zsg+3cIdzhytijWl3WnRTusD18e8xR 9NZhKB2pZI14O0JkHS5pz1+N7QbWO+DGBTUZnNNQxrPTwcEx4jhnV7rdeOGgXApLGZtC q4qTMRodIpHwmYqqGVAK0KrOipMeOpSSEPTCA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AHjqgvBPtfJwtqtx11nuIBtXKRgGXRdUoFHQoaf7Wpie7HnNwWONrhPX5E8K00QJVa H5UIgdvZNjuJtwDzRyPdY1qMwypSvAdnNWMLXLsP2LvM66ntK3wDLlJLRg0gACkeIihn kB1VYk16xtD59tiyNLPdsj9mXGW8StiKar48E= MIME-Version: 1.0 Received: by 10.68.12.226 with SMTP id b2mr824370pbc.44.1308253346369; Thu, 16 Jun 2011 12:42:26 -0700 (PDT) Received: by 10.68.41.97 with HTTP; Thu, 16 Jun 2011 12:42:26 -0700 (PDT) In-Reply-To: <201106051922.p55JM7RF016044@wwwmaster.postgresql.org> References: <201106051922.p55JM7RF016044@wwwmaster.postgresql.org> Date: Thu, 16 Jun 2011 15:42:26 -0400 Message-ID: Subject: Re: BUG #6053: Can't do DISTINCT on citext column From: Robert Haas To: Regina Cc: pgsql-bugs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201106/126 X-Sequence-Number: 30505 On Sun, Jun 5, 2011 at 3:22 PM, Regina wrote: > > The following bug has been logged online: > > Bug reference: =A0 =A0 =A06053 > Logged by: =A0 =A0 =A0 =A0 =A0Regina > Email address: =A0 =A0 =A0lr@pcorp.us > PostgreSQL version: 9.1beta1 > Operating system: =A0 Windows > Description: =A0 =A0 =A0 =A0Can'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. > > =A0CREATE TABLE test > ( > =A0fullname citext COLLATE pg_catalog."POSIX", > ); > > INSERT INTO =A0test(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: =A0could not determine which collation to use for lower() function > HINT: =A0Use the COLLATE clause to set the collation explicitly. I don't see a reply to this bug report, but I believe Tom fixed it in beta2= . --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company