pg_table_size中的“关系不存在”

问题描述 投票:0回答:1

我明白了

错误:关系“testdb”不存在

(注意表名称的情况!)来自

SELECT pg_table_size('testDB');

(请注意表名称案例!)尽管如此

test=> \d
         List of relations
 Schema |   Name    | Type  | Owner 
--------+-----------+-------+-------
 public | testDB    | table | test

这是一个错误吗?混合案例表名称是非法的吗?

postgresql
1个回答
0
投票

你必须引用这个名字

create table "testDB" (/* ... */);

SELECT pg_table_size('"testDB"');

看看:http://rextester.com/ZEF73948

© www.soinside.com 2019 - 2024. All rights reserved.