Re: pg_get__*_ddl consolidation

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Euler Taveira <euler(at)eulerto(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-04-06 11:55:02
Message-ID: 34dc4d59-fec8-43c2-aa7b-38917b3ce0aa@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-04-05 Su 12:35 PM, Jelte Fennema-Nio wrote:
> On Sun, 5 Apr 2026 at 17:06, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> Pushed. I have moved the remaining get_*_ddl items to PG20-1
> +1 on having this feature in general. But I'm not sure I understand
> why it needs the whole bespoke string-based option parsing in the
> first commit. Why not use named arguments for this, i.e. have the
> usage syntax be:
>
> SELECT * FROM pg_get_role_ddl('regress_role_ddl_test3', pretty => true);
>
> Instead of the current:
>
> SELECT * FROM pg_get_role_ddl('regress_role_ddl_test3', 'pretty', 'true');

There was quite a deal of discussion around this mechanism. See Euler's
review at [1] and follow-up at [2] for the original discussion of the
VARIADIC option-parsing design and the use cases it was meant to
address. I'm prepared to revisit it is there's a strong consensus on the
point.

cheers

andrew

[1]
https://www.postgresql.org/message-id/4e60bcae-8222-4e1f-8e5b-d73b59c93304%40app.fastmail.com

[2]
https://www.postgresql.org/message-id/4c695e76-5ab7-449f-8060-76518dd41468%40app.fastmail.com

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-04-06 11:56:33 Re: Adding REPACK [concurrently]
Previous Message Andrew Dunstan 2026-04-06 11:39:44 Re: pg_get__*_ddl consolidation