pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Stevenson <james.stevenson@stev.org>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
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 20:30:10 -0000
Message-ID: <6F38FA239E74854F980A3984B70AB0D603AF90@ex01.stev.local> (raw)
In-Reply-To: <4F244DA3.30602@enterprisedb.com>
References: <E1RrAxL-0007e3-HL@wrigleys.postgresql.org>
	<4F244DA3.30602@enterprisedb.com>

That seems to work.

thanks

-----Original Message-----
From: Heikki Linnakangas [mailto:heikki.linnakangas@enterprisedb.com] 
Sent: 28 January 2012 19:34
To: James Stevenson
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #6413: pg_relation_size wont work on table with upper case chars

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

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1901 / Virus Database: 2109/4763 - Release Date: 01/24/12


view thread (4+ messages)

Message-ID: <6F38FA239E74854F980A3984B70AB0D603AF90@ex01.stev.local>
Permalink:  ../6F38FA239E74854F980A3984B70AB0D603AF90@ex01.stev.local/
Also on:    postgresql.org/message-id/6F38FA239E74854F980A3984B70AB0D603AF90@ex01.stev.local

 · 

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: james.stevenson@stev.org, heikki.linnakangas@enterprisedb.com
  Subject: Re: BUG #6413: pg_relation_size wont work on table with upper case chars
  In-Reply-To: <6F38FA239E74854F980A3984B70AB0D603AF90@ex01.stev.local>
  References: <E1RrAxL-0007e3-HL@wrigleys.postgresql.org> <4F244DA3.30602@enterprisedb.com> <6F38FA239E74854F980A3984B70AB0D603AF90@ex01.stev.local>

* 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