set isolation level for postgresql stored procedures

后端 未结 4 917
温柔的废话
温柔的废话 2020-12-29 05:09

Hopefully a simple question, but one for which I haven\'t readily found a decent answer. I\'m reliably informed that stored procedures (user-defined DB functions) in Postgre

4条回答
  •  感动是毒
    2020-12-29 05:29

    You can't do that.

    What you could do is have your function check what the current transaction isolation level is and abort if it's not the one you want. You can do this by running SELECT current_setting('transaction_isolation') and then checking the result.

提交回复
热议问题