pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: james@stev.org
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6413: pg_relation_size wont work on table with upper case chars
Date: Sat, 28 Jan 2012 21:33:55 +0200
Message-ID: <4F244DA3.30602@enterprisedb.com> (raw)
In-Reply-To: <E1RrAxL-0007e3-HL@wrigleys.postgresql.org>
References: <E1RrAxL-0007e3-HL@wrigleys.postgresql.org>

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



view thread (4+ messages)  latest in thread

Message-ID: <4F244DA3.30602@enterprisedb.com>
Permalink:  ../4F244DA3.30602@enterprisedb.com/
Also on:    postgresql.org/message-id/4F244DA3.30602@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, james@stev.org
  Subject: Re: BUG #6413: pg_relation_size wont work on table with upper case chars
  In-Reply-To: <4F244DA3.30602@enterprisedb.com>
  References: <E1RrAxL-0007e3-HL@wrigleys.postgresql.org> <4F244DA3.30602@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox