pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Japin Li <japinli@hotmail.com>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Daniel Westermann <dwe@dbi-services.com>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: support for MERGE
Date: Wed, 11 May 2022 11:33:50 -0500
Message-ID: <20220511163350.GL19626@telsasoft.com> (raw)
In-Reply-To: <202203281506.se4wtcvtvdq3@alvherre.pgsql>
References: <202203281100.qa7wqdu2ooyy@alvherre.pgsql>
	<202203281506.se4wtcvtvdq3@alvherre.pgsql>

I suggest to reference the mvcc docs from the merge docs, or to make the merge
docs themselves include the referenced information.

inline patch 1: doc/src/sgml/mvcc.sgml, doc/src/sgml/ref/merge.sgml (+2/-1 lines) download inline-1.patchdiff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 341fea524a1..4446e1c484e 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -425,7 +425,7 @@ COMMIT; <para> <command>MERGE</command> allows the user to specify various combinations of <command>INSERT</command>, <command>UPDATE</command> - or <command>DELETE</command> subcommands. A <command>MERGE</command> + and <command>DELETE</command> subcommands. A <command>MERGE</command> command with both <command>INSERT</command> and <command>UPDATE</command> subcommands looks similar to <command>INSERT</command> with an <literal>ON CONFLICT DO UPDATE</literal> clause but does not diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index f68aa09736c..99dd5814f36 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -544,6 +544,7 @@ MERGE <replaceable class="parameter">total_count</replaceable> <command>UPDATE</command> if a concurrent <command>INSERT</command> occurs. There are a variety of differences and restrictions between the two statement types and they are not interchangeable. + See <xref linkend="mvcc"/> for more information. </para> </refsect1>
Also, EXPLAIN output currently looks like this: | Merge on ex_mtarget t (actual rows=0 loops=1) | Tuples Inserted: 0 | Tuples Updated: 50 | Tuples Deleted: 0 | Tuples Skipped: 0 Should the "zero" rows be elided from the text output ? And/or, should it use a more compact output format ? There are two output formats already in use, so the options would look like this: Tuples: Inserted: 1 Updated: 2 Deleted: 3 Skipped: 4 or Tuples: inserted=1 updated=2 deleted=3 skipped=4 Note double spaces and capitals. That's separate from the question about eliding zeros.

view thread (123+ messages)  latest in thread

Message-ID: <20220511163350.GL19626@telsasoft.com>
Permalink:  ../20220511163350.GL19626@telsasoft.com/
Also on:    postgresql.org/message-id/20220511163350.GL19626@telsasoft.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, alvherre@alvh.no-ip.org, peter.eisentraut@enterprisedb.com, amitlangote09@gmail.com, japinli@hotmail.com, zyu@yugabyte.com, simon.riggs@enterprisedb.com, tomas.vondra@enterprisedb.com, dwe@dbi-services.com, er@xs4all.nl, jcasanov@systemguards.com.ec, andres@anarazel.de
  Subject: Re: support for MERGE
  In-Reply-To: <20220511163350.GL19626@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox