diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml new file mode 100644 index e07adda..bc7f4b4 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -22,13 +22,13 @@ PostgreSQL documentation [ WITH with_query [, ...] ] -MERGE INTO target_table_name [ [ AS ] target_alias ] +MERGE INTO [ ONLY ] target_table_name [ [ AS ] target_alias ] USING data_source ON join_condition when_clause [...] where data_source is: -{ source_table_name | ( source_query ) } [ [ AS ] source_alias ] +{ [ ONLY ] source_table_name | ( source_query ) } [ [ AS ] source_alias ] and when_clause is: @@ -129,6 +129,14 @@ DELETE The name (optionally schema-qualified) of the target table to merge into. + If ONLY is specified before the table name, matching + rows are updated or deleted in the named table only. If + ONLY is not specified, matching rows are also updated + or deleted in any tables inheriting from the named table. Optionally, + * can be specified after the table name to explicitly + indicate that descendant tables are included. The + ONLY keyword and * option do not + affect insert actions, which always insert into the named table only. @@ -151,7 +159,12 @@ DELETE The name (optionally schema-qualified) of the source table, view, or - transition table. + transition table. If ONLY is specified before the + table name, matching rows are included from the named table only. If + ONLY is not specified, matching rows are also included + from any tables inheriting from the named table. Optionally, + * can be specified after the table name to explicitly + indicate that descendant tables are included.