2012-04-25 35 views
0

我試圖更新列:PostgreSQL的錯誤:轉換爲所需的編碼

update t_references 
set reference = 'Stöcker W, et al. Autoimmunity to Pancreatic Juice in Crohn’s Disease. 
    Results of an Autoantibody Screening in Patients With Chronic Inflammatory Bowel Disease. <i>Scand J Gastroenterol Suppl</i>. 1987;139:41-52.' 
     ,index = 9 
where reference_id = 161; 

我得到錯誤:

The query could not be converted to the required encoding.

請指教。


我不得不登錄到機器,然後從命令中運行此命令。

+0

psql的'\ d'命令顯示錶的定義是什麼? – vyegorov 2012-04-25 17:57:45

+0

表定義是pg_default – Peter 2012-04-25 18:14:22

+0

此消息由pgadmin生成,而不是由postgresql生成。此外,更新語句本身似乎是可疑的:不加倍或逃避單引號(_Crohn's_),沒有WHERE子句。 – 2012-04-25 18:23:30

回答

1

在遇到同樣的錯誤時,我發現在編輯器(甚至記事本)中打開PGAdmin保存的.SQL文件,然後將內容複製並粘貼到PGAdmin時,可以重新創建它。當我用PGAdmin直接打開文件時,沒有問題。

HTH