Hi, some minor issues: <synopsis> [ WITH <replaceable class="parameter">with_query</replaceable> [, ...] ] MERGE INTO [ ONLY ] <replaceable class="parameter">target_table_name</replaceable> [ * ] [ [ AS ] <replaceable class="parameter">target_alias</replaceable> ] USING <replaceable class="parameter">data_source</replaceable> ON <replaceable class="parameter">join_condition</replaceable> <replaceable class="parameter">when_clause</replaceable> [...] [ RETURNING * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] [, ...] ]
here the "WITH" part should have "[ RECURSIVE ]" like: [ WITH [ RECURSIVE ] <replaceable class="parameter">with_query</replaceable> [, ...] ] + An expression to be computed and returned by the <command>MERGE</command> + command after each row is merged. The expression can use any columns of + the source or target tables, or the <xref linkend="merge_action"/> + function to return additional information about the action executed. + </para> should be: + An expression to be computed and returned by the <command>MERGE</command> + command after each row is changed. one minor issue: add ` table sq_target; table sq_source; ` before `-- RETURNING` in src/test/regress/sql/merge.sql, so we can easily understand the tests.