Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BFCE61337B69 for ; Wed, 11 May 2011 15:59:05 -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 14350-06 for ; Wed, 11 May 2011 18:58:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 23607133798E for ; Wed, 11 May 2011 15:58:57 -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 p4BIwvJ0004543; Wed, 11 May 2011 14:58:57 -0400 (EDT) To: Marc Cousin cc: pgsql-bugs@postgresql.org Subject: Re: collation problem on 9.1-beta1 In-reply-to: <1305139670.25203.3.camel@marco-dalibo> References: <1305139670.25203.3.camel@marco-dalibo> Comments: In-reply-to Marc Cousin message dated "Wed, 11 May 2011 20:47:43 +0200" Date: Wed, 11 May 2011 14:58:57 -0400 Message-ID: <4542.1305140337@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/96 X-Sequence-Number: 30235 Marc Cousin writes: > I've been starting to work on a 'what's new in 9.1' like i did last > year, and am faced with what I feel is a bug, while building a demo case > for collation. > Here it is: > SELECT * from (values ('llegar'),('llorer'),('lugar')) as tmp > order by 1 collate "es_ES.utf8"; > ERROR: collations are not supported by type integer at character 74 This isn't a bug, or at least not one we're going to fix. ORDER BY column-number is a legacy syntax that doesn't support many options, and COLLATE is one of the ones that it doesn't support. (The actual technical reason for this is that COLLATE turns the argument into a general expression, not something we can special-case. You would get the same error from writing "1 COLLATE something" anyplace else.) regards, tom lane