Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id EFA80133FFA5 for ; Sat, 28 Jan 2012 15:34:17 -0400 (AST) Received: from exprod7og126.obsmtp.com ([64.18.2.206]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RrE2Q-0001UW-2s for pgsql-bugs@postgresql.org; Sat, 28 Jan 2012 19:34:17 +0000 Received: from mail-lpp01m010-f43.google.com ([209.85.215.43]) (using TLSv1) by exprod7ob126.postini.com ([64.18.6.12]) with SMTP ID DSNKTyRNp2MhrQ93rtWhZnfgKlg8yMlCZBlL@postini.com; Sat, 28 Jan 2012 11:34:13 PST Received: by lagp5 with SMTP id p5so743573lag.30 for ; Sat, 28 Jan 2012 11:33:58 -0800 (PST) Received: by 10.152.146.168 with SMTP id td8mr5886274lab.36.1327779238327; Sat, 28 Jan 2012 11:33:58 -0800 (PST) Received: from [192.168.1.102] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id j4sm9338161lbf.6.2012.01.28.11.33.56 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 Jan 2012 11:33:57 -0800 (PST) Message-ID: <4F244DA3.30602@enterprisedb.com> Date: Sat, 28 Jan 2012 21:33:55 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0 MIME-Version: 1.0 To: james@stev.org CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6413: pg_relation_size wont work on table with upper case chars References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/220 X-Sequence-Number: 32287 On 28.01.2012 18:16, james@stev.org wrote: > I suspect pg_relation_size has a tolower in it to a table name called > Attempts will not work with pg_relation_size > > Both > > pg_relation_size('Attempts') > and > pg_relation_size('attempts') > > fails with no such table. > > After table rename from Attempts to attempts it will work. Try double-quoting the table name, within the single-quotes: pg_relation_size('"Attempts"'). This is explained in the context of nextval() function at: http://www.postgresql.org/docs/9.1/static/functions-sequence.html Looks like the manual page on pg_relation_size(), or "Object Identifier Types" where the regclass datatype is otherwise explained, don't mention anything about the double-quoting. Patches to improve that are welcome.. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com