Re: pg_get__*_ddl consolidation

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, japin <japinli(at)hotmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_get__*_ddl consolidation
Date: 2026-06-24 19:48:20
Message-ID: CAGECzQSunZ36K4roP0gQ8YbE8uHH=vup6zgM86Kkywy=b=i=zA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 7 Apr 2026 at 14:36, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> wrote:
> So to summarize (from my biased viewpoint) I think the downsides are:
> 1. Uncommon calling convention: only pg_restore_*_stats and
> pg_logical_slot_*_changes use it, while all other functions support
> named parameters.
> 2. Needs custom option parsing logic
> 3. More characters to type because you have to quote booleans, integers
> and argument names.
> 4. Requires functions to be marked as NOSTRICT, which then needs
> additional NULL handling
> 5. It can be unclear to a reader of a query that the function arguments
> should be interpreted as key-value pair
> 6. Breaks auto formatting
>
> And the benefit:
> 1. Forces people to specify the argument name
>
> I don't think those benefits outweigh the downsides.

I'm not sure how I can explain my argument better. I think it'd be sad
if we standardized these pg_get_ddl_* functions to use this suboptimal
calling convention.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christophe Pettus 2026-06-24 20:02:18 Re: uuidv7 improperly accepts dates before 1970-01-01
Previous Message Bharath Rupireddy 2026-06-24 19:47:13 Re: Add MIN/MAX aggregate support for uuid