Re: PATCH: pg_dump to support "on conflict do update"

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: PATCH: pg_dump to support "on conflict do update"
Дата
Msg-id d7fe9dc9f3e020e16f9121074b2ddeb33c350ee8.camel@cybertec.at
обсуждение исходный текст
Ответ на PATCH: pg_dump to support "on conflict do update"  (Tanin Na Nakorn <tanin47@gmail.com>)
Ответы Re: PATCH: pg_dump to support "on conflict do update"
Список pgsql-hackers
On Sat, 2025-05-03 at 22:47 -0700, Tanin Na Nakorn wrote:
> Here's the patch (against the latest master) that will make pg_dump support "on conflict do update" .
>
> I've used this patch on v16 for our company's CI (on Github Actions), and it works perfectly fine.
>
> Users would be able to use it like this:
>
> ./src/bin/pg_dump/pg_dump $DATABASE_URL \
>             --table=some_random_table \
>             --data-only \
>             --on-conflict-target-columns url,payload_checksum \
>             --on-conflict-update-clause='last_used_at=EXCLUDED.last_used_at' \
>             --inserts \
>             --rows-per-insert=10 \
>             --no-sync \
>             --file=/tmp/test.dump
>
> There are 3 caveats:
>
> 1. The "on conflict do update" would apply to every table. In my opinion, this is fine.

I don't think that is fine.  I think it would make the feature unusable for most cases.
At the very least, there would have to be a way to specify which tables are affected.

Yours,
Laurenz Albe



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