运算符不存在:Postgresql中的json - text []错误

时间:2016-08-24 20:08:25

标签: sql postgresql

我尝试使用此查询删除Postgresql表中的某些行:

DELETE FROM log_sp_montreal_test.person_contact 
WHERE id NOT IN (SELECT id FROM log_sp_montreal_test.person_contact limit 100)

我正在使用PgAdminIII,但是当我在SQL编辑器中运行它时,我得到了这个奇怪的错误:

    ERROR:  operator does not exist: json - text[]
LINE 1: SELECT row_to_json(OLD.*)::json - ignored::TEXT[]
                                        ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
QUERY:  SELECT row_to_json(OLD.*)::json - ignored::TEXT[]
CONTEXT:  PL/pgSQL function log_sp_montreal_test.add_journalization_entry() line 17 at assignment
********** Error **********

ERROR: operator does not exist: json - text[]
SQL state: 42883
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Context: PL/pgSQL function log_sp_montreal_test.add_journalization_entry() line 17 at assignment

id是一个uuid,但是这个错误是什么?如何运行它?

0 个答案:

没有答案