2017-04-06 32 views
0

我創建了WSI模式,並試圖在該查詢下創建一個表格,我不斷收到下面的錯誤。我試圖將搜索路徑設置爲新模式,但我仍然遇到同樣的錯誤。如何選擇模式以在PostgreSQL中創建表格

ERROR: no schema has been selected to create in 
SQL state: 3F000 

我嘗試和輸出功能如下所示

enter image description here

+0

請您複製/粘貼SQL腳本和整個輸出爲文本而不是圖像。 –

+0

對不起,沒有意識到我的截圖沒有顯示腳本。 create table wsi.032616to032617_new(column1 varchar,userid varchar,cnt int); – Kaylee

回答

0

我懷疑這是造成問題的大寫的模式名稱。

test=# set search_path to WSI; 
SET 
test=# show search_path; 
search_path 
------------- 
wsi 
(1 row) 

test=# create table myt (id integer); 
ERROR: no schema has been selected to create in 
LINE 1: create table myt (id integer); 
        ^
test=# set search_path to "WSI"; 
SET 
test=# show search_path; 
search_path 
------------- 
"WSI" 
(1 row) 

test=# create table myt (id integer); 
CREATE TABLE 
+0

感謝您的幫助! – Kaylee

相關問題