Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 890D51336FA7 for ; Mon, 24 Jan 2011 15:48:22 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 59204-06 for ; Mon, 24 Jan 2011 19:48:22 +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 E6F7E1336B42 for ; Mon, 24 Jan 2011 15:48:21 -0400 (AST) 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 p0OJmLw9005708 for ; Mon, 24 Jan 2011 19:48:21 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p0OJmLeL005707; Mon, 24 Jan 2011 19:48:21 GMT (envelope-from www) Date: Mon, 24 Jan 2011 19:48:21 GMT Message-Id: <201101241948.p0OJmLeL005707@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5845: Postgres does not seem to handle unquoted upper cased object identifiers From: "Kasia Tuszynska" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201101/175 X-Sequence-Number: 29197 The following bug has been logged online: Bug reference: 5845 Logged by: Kasia Tuszynska Email address: ktuszynska@esri.com PostgreSQL version: 9.0.2 Operating system: Windows 2008 R2 (64bit) Description: Postgres does not seem to handle unquoted upper cased object identifiers Details: This issue was reported by a customer in Spain, the original examples with table and column names specific to the Spanish language. Basic issue: In the documentation Postgres states that it's identifiers (table, column names etc)are case insensitive and thus it stores everything in lower case. To preserve case of a identifier, the name needs to be quoted. So, in the example: create table TESTá007 (objectid integer); create table testá007 (objectid integer); - the second statement should fail with a table exists error. But it's handing of incoming upper cased identifiers seems to be inconsistent. We have observed the following: create table á007 (objectid integer); select * from á007;Found select * from Á007;Not Found create table Á008 (objectid integer); select * from Á008;Found select * from á008;Not Found This inability to ignore the case causes problems when trying to delete the table. It seems that the upper and lower functions are not working as expected: select upper('ñ006'),lower('Ñ005'); "ñ006";"Ñ005" Environments Tested: Version 8.3.8 (codepage win1252 and Spain locale): --all query return records correctly with upper and lower case. Version 9.0.0: --error trying to delete table á008 Version 9.0.2(codepage win1252 and Spanish locale) --error trying to delete table á008