如何将带有返回状态的存储过程从SQL Server/Sybase迁移到PostgreSQL?

0

【以下的问题经过翻译处理】 在从SQL Server或Sybase数据库迁移到PostgreSQL时,如何转换具有返回状态的存储过程, 并检查过程调用是否成功。

比如以下存储过程例子: EXEC @return_status = sample_proc

profile picture
EXPERT
asked 9 months ago49 views
1 Answer
0

【以下的回答经过翻译处理】 如果没有事务级别的提交或回滚语句的需求,那么可以选择在PostgreSQL中将其作为“函数”并根据执行逻辑返回状态码。与商用数据库引擎中的“存储过程”相比,PostgreSQL中的“函数”可以适应大多数情况。

profile picture
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions