MERGE 语句的锁定级别

Lock level on MERGE statement

有谁知道 PostgreSQL MERGE 命令的锁定级别(行,table)是多少?我试图深入研究文档,但找不到任何可以理清思路的内容。如果有人有线索并乐于分享,将不胜感激。

来自manual

ROW EXCLUSIVE Conflicts with the SHARE, SHARE ROW EXCLUSIVE, EXCLUSIVE, and ACCESS EXCLUSIVE lock modes.

The commands UPDATE, DELETE, INSERT, and MERGE acquire this lock mode on the target table (in addition to ACCESS SHARE locks on any other referenced tables). In general, this lock mode will be acquired by any command that modifies data in a table.