Re: [HACKERS] MERGE SQL Statement for PG11

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] MERGE SQL Statement for PG11
Дата
Msg-id 20171027124555.txawx6p6veikx25x@alvherre.pgsql
обсуждение исходный текст
Ответ на [HACKERS] MERGE SQL Statement for PG11  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: [HACKERS] MERGE SQL Statement for PG11  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs wrote:

> Earlier thoughts on how this could/could not be done were sometimes
> imprecise or inaccurate, so I have gone through the command per
> SQL:2011 spec and produced a definitive spec in the form of an SGML
> ref page. This is what I intend to deliver for PG11.

Nice work.  I didn't verify the SQL spec, just read your HTML page;
some very minor comments based on that:

* use "and" not "where" as initial words in "when_clause" and "merge_update" clause definitions

* missing word here: "the DELETE privilege on the if you specify"

* I think the word "match." is leftover from some editing in the phrase " that specifies which rows in the data_source
matchrows in the target_table_name. match."  In the same paragraph, it is not clear whether all columns must be matched
orit can be a partial match.
 

* In the when_clause note, it is not clear whether you can have multiple WHEN MATCHED and WHEN NOT MATCHED clauses.
Obviouslyyou can have one of each, but I think your doc says it is possible to have more than one of each, with
differentconditions (WHEN MATCHED AND foo THEN bar WHEN MATCHED AND baz THEN qux).  No example shows more than one.
 
 On the same point: Is there short-circuiting of such conditions, i.e. will the execution will stop looking for further
WHENmatches if some rule matches, or will it rather check all rules and raise an error if more than one WHEN rules
matcheach given row?
 

* Your last example uses ELSE but that appears nowhere in the synopsys.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: [HACKERS] Linking libpq statically to libssl
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] parallel.c oblivion of worker-startup failures