0
我已經將SQL轉儲導入名爲Test的數據庫,現在當我嘗試描述該表時,它給我一個錯誤,因爲關係不存在。但是當我在information_schema.columns上做同樣的操作時,我得到了結果。同樣的錯誤也會導致修改或選擇操作失敗。PostgreSQL在導入的數據描述或任何操作時出錯
# \connect Test
Password for user postgres:
psql (8.4.18)
You are now connected to database "Test".
Test=# \d
List of relations
Schema | Name | Type | Owner
--------+-----------------------+----------+----------
. . .
public | TESTEMP | table | postgres
. . .
Test-# \d+ TestEmp;
Did not find any relation named "Test".
Test=# select column_name from INFORMATION_SCHEMA.COLUMNS where table_name = 'TestEmp';
column_name
--------------------
lastname
firstname
Test=# alter table TestEmp Add column "PerEmp" BOOLEAN DEFAULT FALSE;
ERROR: relation "testemp" does not exist
Test=# select * from TestEmp;
ERROR: relation "testemp" does not exist
LINE 1: select * from testemp;
^
MediaService=#
任何想法爲什麼會報告這些錯誤。