postgresql/src/include/catalog
Dean Rasheed c649fa24a4 Add RETURNING support to MERGE.
This allows a RETURNING clause to be appended to a MERGE query, to
return values based on each row inserted, updated, or deleted. As with
plain INSERT, UPDATE, and DELETE commands, the returned values are
based on the new contents of the target table for INSERT and UPDATE
actions, and on its old contents for DELETE actions. Values from the
source relation may also be returned.

As with INSERT/UPDATE/DELETE, the output of MERGE ... RETURNING may be
used as the source relation for other operations such as WITH queries
and COPY commands.

Additionally, a special function merge_action() is provided, which
returns 'INSERT', 'UPDATE', or 'DELETE', depending on the action
executed for each row. The merge_action() function can be used
anywhere in the RETURNING list, including in arbitrary expressions and
subqueries, but it is an error to use it anywhere outside of a MERGE
query's RETURNING list.

Dean Rasheed, reviewed by Isaac Morland, Vik Fearing, Alvaro Herrera,
Gurjeet Singh, Jian He, Jeff Davis, Merlin Moncure, Peter Eisentraut,
and Wolfgang Walther.

Discussion: http://postgr.es/m/CAEZATCWePEGQR5LBn-vD6SfeLZafzEm2Qy_L_Oky2=qw2w3Pzg@mail.gmail.com
2024-03-17 13:58:59 +00:00
..
.gitignore Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
Makefile Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
binary_upgrade.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
catalog.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
catversion.h Add RETURNING support to MERGE. 2024-03-17 13:58:59 +00:00
dependency.h Remove unnecessary array object_classes[] in dependency.c 2024-02-27 15:18:17 +09:00
duplicate_oids Update copyright for 2024 2024-01-03 20:49:05 -05:00
genbki.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
heap.h Generalize handling of nullable pg_attribute columns in DDL 2024-03-17 12:30:51 +01:00
index.h Add attstattarget to FormExtraData_pg_attribute 2024-03-17 12:38:27 +01:00
indexing.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
namespace.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
objectaccess.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
objectaddress.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
partition.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_aggregate.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_aggregate.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_am.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_am.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_amop.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_amop.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_amproc.dat Add stratnum GiST support function 2024-01-19 15:42:13 +01:00
pg_amproc.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_attrdef.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_attribute.h Add attstattarget to FormExtraData_pg_attribute 2024-03-17 12:38:27 +01:00
pg_auth_members.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_authid.dat Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
pg_authid.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_cast.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_cast.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_class.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_class.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_collation.dat Introduce "builtin" collation provider. 2024-03-13 23:33:44 -07:00
pg_collation.h Introduce "builtin" collation provider. 2024-03-13 23:33:44 -07:00
pg_constraint.h Rename pg_constraint.conwithoutoverlaps to conperiod 2024-03-05 11:24:17 +01:00
pg_control.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_conversion.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_conversion.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_database.dat Catalog changes preparing for builtin collation provider. 2024-03-09 14:48:18 -08:00
pg_database.h Catalog changes preparing for builtin collation provider. 2024-03-09 14:48:18 -08:00
pg_db_role_setting.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_default_acl.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_depend.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_description.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_enum.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_event_trigger.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_extension.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_foreign_data_wrapper.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_foreign_server.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_foreign_table.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_index.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_inherits.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_init_privs.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_language.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_language.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_largeobject.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_largeobject_metadata.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_namespace.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_namespace.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_opclass.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_opclass.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_operator.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_operator.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_opfamily.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_opfamily.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_parameter_acl.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_partitioned_table.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_policy.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_proc.dat Add pg_column_toast_chunk_id(). 2024-03-14 10:58:00 -05:00
pg_proc.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_publication.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_publication_namespace.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_publication_rel.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_range.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_range.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_replication_origin.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_rewrite.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_seclabel.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_sequence.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_shdepend.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_shdescription.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_shseclabel.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_statistic.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_statistic_ext.h Make stxstattarget nullable 2024-03-17 12:26:26 +01:00
pg_statistic_ext_data.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_subscription.h Add a failover option to subscriptions. 2024-01-30 16:49:28 +05:30
pg_subscription_rel.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_tablespace.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_tablespace.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_transform.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_trigger.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_config.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_config.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_config_map.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_config_map.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_dict.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_dict.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_parser.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_parser.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_template.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_template.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_type.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_type.h Revert "Improve compression and storage support with inheritance" 2024-02-20 11:10:59 +01:00
pg_user_mapping.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
reformat_dat_file.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
renumber_oids.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage_xlog.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
toasting.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
unused_oids Update copyright for 2024 2024-01-03 20:49:05 -05:00