0

我有一个名为“ medrealize ()”的 postgres 函数,我在其中创建临时表并使用以下行为临时表创建索引

CREATE INDEX SQLOPS_RefICD_ICD10_idx ON  t$SQLOPS_RefICD_ICD10 USING gist (code gist_trgm_ops );
CREATE INDEX regexes_idx ON  t$regexes  USING gist (icdregex  gist_trgm_ops );

从 pgadmin 调用该函数时,该函数运行没有任何问题。但是当从 python 调用函数时使用

cursor.execute("BEGIN")
cursor.execute("CALL medrealize();")
cursor.execute("COMMIT")

我得到以下错误

operator class \"gist_trgm_ops\" does not exist for access method \"gist\"\

知道为什么它在从 PgAdmin 调用时运行良好并在从 Python 调用时引发错误吗?

4

0 回答 0