| From: | "Euler Taveira" <euler(at)eulerto(dot)com> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, "Amul Sul" <sulamul(at)gmail(dot)com> |
| Cc: | "Akshay Joshi" <akshay(dot)joshi(at)enterprisedb(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Chao Li" <li(dot)evan(dot)chao(at)gmail(dot)com>, japin <japinli(at)hotmail(dot)com>, "Quan Zongliang" <quanzongliang(at)yeah(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement |
| Date: | 2026-02-25 21:19:27 |
| Message-ID: | 0fbd1982-4bc3-4c10-aa66-9446af7dc48a@app.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Feb 25, 2026, at 8:53 AM, Álvaro Herrera wrote:
>
> I'm surprised to not have seen an update on this topic following the
> discovery by Mark Wong that commit d32d1463995c (in branch 18) already
> established a convention for passing arguments to functions: use argument
> pairs to variadic functions, the way pg_restore_relation_stats() and
> pg_restore_attribute_stats() work. While I like my previous suggestion
> of using DefElems better, I think it's more sensible to follow this
> established precedent and not innovate on this.
>
This convention is much older than the referred commit. It predates from the
logical decoding (commit b89e151054a0). See pg_logical_slot_get_changes_guts()
that is an internal function for pg_logical_slot_FOO_changes(). It seems a
good idea to have a central function to validate the variadic parameter for all
of these functions.
--
Euler Taveira
EDB https://www.enterprisedb.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Corey Huinker | 2026-02-25 21:22:06 | Add starelid, attnum to pg_stats and leverage this in pg_dump |
| Previous Message | Jeff Davis | 2026-02-25 21:03:01 | Re: Expanding HOT updates for expression and partial indexes |