dbTalk Databases Forums  

Re: [BUGS] BUG #6413: pg_relation_size wont work on table with uppercase chars

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #6413: pg_relation_size wont work on table with uppercase chars in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Euler Taveira de Oliveira
 
Posts: n/a

Default Re: [BUGS] BUG #6413: pg_relation_size wont work on table with uppercase chars - 01-28-2012 , 01:28 PM






On 28-01-2012 13:16, james (AT) stev (DOT) org wrote:
Quote:
pg_relation_size('Attempts')
and
pg_relation_size('attempts')

pg_relation_size('"Attempts"')


--
Euler Taveira de Oliveira - Timbira http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
  #2  
Old   
Heikki Linnakangas
 
Posts: n/a

Default Re: [BUGS] BUG #6413: pg_relation_size wont work on table with uppercase chars - 01-28-2012 , 01:33 PM






On 28.01.2012 18:16, james (AT) stev (DOT) org wrote:
Quote:
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/s...-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

--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.