2014-02-20 4 views
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=# 

이러한 오류가보고되는 이유.

답변

0

해결되었습니다. 대소 문자를 구별하기 위해 따옴표로 묶인 문자열을 사용하여 테이블을 만들었습니다. 그래서 내가 그 아래에 하나의 오류없이 테이블을 설명했다.

#\d+ "TESTEMP" 
        Table "public.TESTEMP" 
     Column  |   Type    | Modifiers 
--------------------+-----------------------------+----------- 
. . . 

앞으로도 계속이 질문을 남기십시오.