pg_dump to support "on conflict do update"

Поиск
Список
Период
Сортировка
От Tanin Na Nakorn
Тема pg_dump to support "on conflict do update"
Дата
Msg-id CAPSThKnJdyXt3Zsq5dx3N9EYohXo_eYcnP7GVFfCtWXdOuvHog@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_dump to support "on conflict do update"
Re: pg_dump to support "on conflict do update"
Список pgsql-hackers
Hi hackers,

I've made a proof of concept for pg_dump to support "on conflict do update" here: https://github.com/tanin47/postgres/pull/1

It can be used with the following options: --on-conflict-target-columns url,payload_checksum --on-conflict-update-clause='last_used_at=EXCLUDED.last_used_at'

I'd love to go through the process of making a patch and merge it into the repo.

Before doing that, I'd like to improve a few things first, so I have a few questions:

1. I'd love an opinion on whether the options' shapes look fine where --on-conflict-target-columns is a list of columns and --on-conflict-update-clause is a string. Would love some input there.
2. I'd like to add a test but couldn't exactly find a good example for a test on pg_dump. I wonder if anyone can point me to an example or in the right direction.
3. Is it possible to patch this into the version 16 as well as the version 17 and latest main branch? Because I use v16.

Thank you,
Tanin

FYI, I've compiled the code and used this in production. Therefore, I'm not blocked.

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