我正在迁移一个Oracle PLSQLSP以兼容Postgres plpgsql(x86_64-PC-LINUX-GNU上的PostgreSQL13.6版本,由x86_64-PC-LINUX-GNU-GCC(GCC)7.4.0编译,64位).
PLSQL SP的异常块代码如下:
exception
when others then
if CURR1%isopen then
close SPV_RECON_INFO;
end if;
open CURR1 for execute select sysdate from dual;
END;
如何在postgres中实现%isopen?