【发布时间】:2012-12-03 22:20:37
【问题描述】:
重要信息
- 我在 Windows 7 64 位上使用 Postgresql 9.2。它是使用Postgresql website提供的安装程序安装的
- 我以 postgres 身份登录到 postgres 数据库
- 我在 postgres 用户下创建 BryceTest Schema
- 我将
search_path配置为显示"brycetest, public"
当由 pgAdmin-III 提供的查询生成器生成时,此 SQL 按预期工作
SELECT "DummyDataMasterTable"."Dummy_PK",
"DummyDataMasterTable"."DummyName"
FROM "BryceTest"."DummyDataMasterTable";
但这不是
SELECT DummyDataMasterTable.Dummy_PK,
DummyDataMasterTable.DummyName
FROM BryceTest.DummyDataMasterTable;
-------------------------------------------
ERROR: relation "dummydatamastertable" does not exist
LINE 4: FROM DummyDataMasterTable;
^
********** Error **********
ERROR: relation "dummydatamastertable" does not exist
SQL state: 42P01
Character: 101
FROM BryceTest.DummyDataMasterTable;
也没有
SELECT
Dummy_PK,
DummyName
FROM DummyDataMasterTable;
-------------------------------
ERROR: relation "dummydatamastertable" does not exist
LINE 4: FROM DummyDataMasterTable; ^
********** Error **********
ERROR: relation "dummydatamastertable" does not exist
SQL state: 42P01
Character: 59
我会认为通过配置我的架构 search_path 来查看我新创建的架构 FIRST,它不需要完全限定 schemaName.tableName
【问题讨论】:
标签: database database-schema postgresql-9.2