Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YOAX5-0003h8-A1 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Feb 2015 19:43:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YOAX4-0008OC-P6 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Feb 2015 19:43:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YOAX3-0008MK-Kn for pgsql-bugs@postgresql.org; Wed, 18 Feb 2015 19:43:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YOAX0-0004BZ-GG for pgsql-bugs@postgresql.org; Wed, 18 Feb 2015 19:43:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t1IJhWKE030859; Wed, 18 Feb 2015 14:43:32 -0500 From: Tom Lane To: gibheer@zero-knowledge.org cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12784: pg_relation_size has problems with case in index name In-reply-to: <20150218192712.8729.67799@wrigleys.postgresql.org> References: <20150218192712.8729.67799@wrigleys.postgresql.org> Comments: In-reply-to gibheer@zero-knowledge.org message dated "Wed, 18 Feb 2015 19:27:12 +0000" Date: Wed, 18 Feb 2015 14:43:32 -0500 Message-ID: <30858.1424288612@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org gibheer@zero-knowledge.org writes: > I found a problem with indexes which have an uppercase letter in the name. > You can reproduce it with the following statements: > create table unfindable("Test" text); > create index on unfindable("Test"); > \d unfindable > select pg_relation_size('unfindable_Test_idx'); This isn't a bug. You need to double-quote the index name, just the same as you would do at the SQL level. regression=# create table unfindable("Test" text); CREATE TABLE regression=# create index on unfindable("Test"); CREATE INDEX regression=# \d unfindable Table "public.unfindable" Column | Type | Modifiers --------+------+----------- Test | text | Indexes: "unfindable_Test_idx" btree ("Test") regression=# select pg_relation_size('unfindable_Test_idx'); ERROR: relation "unfindable_test_idx" does not exist LINE 1: select pg_relation_size('unfindable_Test_idx'); ^ regression=# select pg_relation_size('"unfindable_Test_idx"'); pg_relation_size ------------------ 8192 (1 row) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs