-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adam Szojda a écrit : > Package: postgresql-8.3 > Version: 8.3.6-1 > Severity: normal > > Hi > > Text version of pg_total_relation_size function fails on relations with > CamelCase names:
You need to double-quote the name : test3=# select pg_total_relation_size('"CamelCaseTest"'); That's not a bug. > > test3=# create table "simple_test" (id serial primary key, data > integer); > NOTICE: CREATE TABLE will create implicit sequence "simple_test_id_seq" > for serial column "simple_test.id" > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "simple_test_pkey" for table "simple_test" > CREATE TABLE > test3=# create table "CamelCaseTest" (id serial primary key, data > integer); > NOTICE: CREATE TABLE will create implicit sequence > "CamelCaseTest_id_seq" for serial column "CamelCaseTest.id" > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "CamelCaseTest_pkey" for table "CamelCaseTest" > CREATE TABLE > test3=# select pg_total_relation_size('simple_test'); > pg_total_relation_size > ------------------------ > 8192 > (1 row) > > test3=# select pg_total_relation_size('CamelCaseTest'); > ERROR: relation "camelcasetest" does not exist > Test3=# > > The OID version works OK: > > test3=# select pg_total_relation_size((select oid from pg_class where > relname='CamelCaseTest')); > pg_total_relation_size > ------------------------ > 8192 > (1 row) > > > Regards, > Adam Szojda > > > -- System Information: > Debian Release: 5.0 > APT prefers stable > APT policy: (500, 'stable') > Architecture: amd64 (x86_64) > > Kernel: Linux 2.6.26-1-amd64 (SMP w/8 CPU cores) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) > Shell: /bin/sh linked to /bin/bash > > Versions of packages postgresql-8.3 depends on: > ii libc6 2.7-18 GNU C Library: Shared > libraries > ii libcomerr2 1.41.3-1 common error description > library > ii libkrb53 1.6.dfsg.4~beta1-5 MIT Kerberos runtime > libraries > ii libldap-2.4-2 2.4.11-1 OpenLDAP libraries > ii libpam0g 1.0.1-5 Pluggable Authentication > Modules l > ii libpq5 8.3.6-1 PostgreSQL C client library > ii libssl0.9.8 0.9.8g-15 SSL shared libraries > ii libxml2 2.6.32.dfsg-5 GNOME XML library > ii locales 2.7-18 GNU C Library: National > Language ( > ii postgresql-client-8.3 8.3.6-1 front-end programs for > PostgreSQL > ii postgresql-common 94lenny1 PostgreSQL database-cluster > manage > ii ssl-cert 1.0.23 simple debconf wrapper for > OpenSSL > ii tzdata 2008h-2 time zone and > daylight-saving time > > postgresql-8.3 recommends no packages. > > Versions of packages postgresql-8.3 suggests: > pn oidentd | ident-server <none> (no description available) > > -- no debconf information - -- Cédric Villemain Administrateur de Base de Données Cel: +33 (0)6 74 15 56 53 http://dalibo.com - http://dalibo.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknJ+0YACgkQo/dppWjpEvx5CgCfTEeoeRx8sY0CRIyzx9S1qDH/ aUgAniMhes0KfX5Mw+Pn4CCy8agL3hA8 =CL/p -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org