Re: support for MERGE

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: support for MERGE
Дата
Msg-id 202203251536.dbvhn2ygk3aa@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: support for MERGE  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: support for MERGE  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Here's v20, another rebase with some small changes:

- Changed psql tab-completion as suggested by Peter.  However, I didn't
  use Query_for_list_of_updatables because that includes relation types
  that aren't supported by MERGE, so I kept a separate query definition
  including only plain and partitioned tables.  While at it, fix its
  quoting: use of quote_ident() is no longer necessary.

- I changed the MergeWhenClause productions in the grammar to be more
  self-contained.  In the original, there was too much stuff being done
  in its caller production.  For example, the production for DELETE was
  returning NULL and the caller was creating the struct .. not sure why.

  Also, set all the fields in the struct, not just some.  This is not
  strictly necessary since the struct is zeroed by makeNode anyway, but
  this is out standard practice and looks more tidy -- this is what led
  me to discover the next point.

- I noticed that node MergeWhenClause had a member 'cols' to store
  INSERT columns, but at the same time it was ignoring the targetList
  member, which was documented to be used for this.  I don't know the
  reason for this separate member.  I removed 'cols' and made the code
  use 'targetList' instead.

- parse_clause.[ch] still contained some changes that were no longer
  necessary due to my earlier hacking on parse analysis.  Put them back
  as they were.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/

Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: pg_relation_size on partitioned table
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: psql - add SHOW_ALL_RESULTS option