Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement

From: Japin Li <japinli(at)hotmail(dot)com>
To: Florin Irion <irionr(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Haritabh Gupta <haritabh1992(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement
Date: 2026-03-12 01:20:09
Message-ID: SY7PR01MB10921E12167EF45F9014863F2B644A@SY7PR01MB10921.ausprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi, Florin

On Tue, 10 Mar 2026 at 16:01, Florin Irion <irionr(at)gmail(dot)com> wrote:
> Hello,
>
> v10 rebased on latest master attached.
>

Thanks for updating the patch. When I reviewed [1], I noticed that
pg_get_database_ddl() uses spaces for indentation instead of tabs.
What do you think?

1.
+ /* Add valid constraints */
+ foreach(lc, validConstraints)
+ {
+ Oid constraintOid = lfirst_oid(lc);

IMO, I think we can replace foreach() with foreach_oid().

2.
+ foreach(lc, invalidConstraints)
+ {
+ Oid constraintOid = lfirst_oid(lc);

Same as above.

[1] https://www.postgresql.org/message-id/CANxoLDc6FHBYJvcgOnZyS%2BjF0NUo3Lq_83-rttBuJgs9id_UDg%40mail.gmail.com

> Cheers,
> Florin
>
>
> www.enterprisedb.com
>
> [2. text/plain; v10-0001-Add-pg_get_domain_ddl-function-to-reconstruct-CR.patch]...

--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message zhanghu 2026-03-12 01:37:52 Re: Add documentation for PG_ABS_SRCDIR, PG_ABS_BUILDDIR, PG_LIBDIR, PG_DLSUFFIX
Previous Message Chao Li 2026-03-12 01:14:20 Re: ALTER TABLE: warn when actions do not recurse to partitions