Re: BUG #12784: pg_relation_size has problems with case in index name
От | Tom Lane |
---|---|
Тема | Re: BUG #12784: pg_relation_size has problems with case in index name |
Дата | |
Msg-id | 30858.1424288612@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #12784: pg_relation_size has problems with case in index name (gibheer@zero-knowledge.org) |
Список | pgsql-bugs |
gibheer@zero-knowledge.org writes: > I found a problem with indexes which have an uppercase letter in the name. > You can reproduce it with the following statements: > create table unfindable("Test" text); > create index on unfindable("Test"); > \d unfindable > select pg_relation_size('unfindable_Test_idx'); This isn't a bug. You need to double-quote the index name, just the same as you would do at the SQL level. regression=# create table unfindable("Test" text); CREATE TABLE regression=# create index on unfindable("Test"); CREATE INDEX regression=# \d unfindable Table "public.unfindable" Column | Type | Modifiers --------+------+----------- Test | text | Indexes: "unfindable_Test_idx" btree ("Test") regression=# select pg_relation_size('unfindable_Test_idx'); ERROR: relation "unfindable_test_idx" does not exist LINE 1: select pg_relation_size('unfindable_Test_idx'); ^ regression=# select pg_relation_size('"unfindable_Test_idx"'); pg_relation_size ------------------ 8192 (1 row) regards, tom lane
В списке pgsql-bugs по дате отправления: