Thread: BUG #5023: pg_relation_size() is not case sensitive
The following bug has been logged online: Bug reference: 5023 Logged by: Joseph Shraibman Email address: jks@selectacast.net PostgreSQL version: 8.3.7 Operating system: Linux Description: pg_relation_size() is not case sensitive Details: The pg_relation_size(text) method cannot determine the size of a relation that has capital letters. This became an issue for me because some of Slony's indexes use capital letters. The workaround is to use the version of the function that takes an oid. This issue exists in 8.3.7 and 8.2.13.
"Joseph Shraibman" <jks@selectacast.net> wrote: > The pg_relation_size(text) method cannot determine the size of a > relation that has capital letters. Did you try putting quotes inside the apostrophes?: SELECT pg_relation_size('"MixedCaseRelation"'); -Kevin
Joseph Shraibman <jks@selectacast.net> wrote: > Kevin Grittner wrote: >> Did you try putting quotes inside the apostrophes?: >> > No, I didn't. I didn't know I could do that. That's generally true in recent versions. (Try the -t option on pg_dump for the first place I ran into it.) Perhaps it should be documented better, but it doesn't seem like a good idea to put it everywhere a relation name is referenced. I wonder if it would be overkill to have a short page on the topic in the documentation and just link to it from each documentation page where it might be needed.... -Kevin
Kevin Grittner wrote: > "Joseph Shraibman" <jks@selectacast.net> wrote: > >> The pg_relation_size(text) method cannot determine the size of a >> relation that has capital letters. > > Did you try putting quotes inside the apostrophes?: > No, I didn't. I didn't know I could do that. > SELECT pg_relation_size('"MixedCaseRelation"'); > > -Kevin