Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement - Mailing list pgsql-hackers

From Japin Li
Subject Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement
Date
Msg-id SY7PR01MB10921E12167EF45F9014863F2B644A@SY7PR01MB10921.ausprd01.prod.outlook.com
Whole thread Raw
In response to Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement  (Florin Irion <irionr@gmail.com>)
List pgsql-hackers
Hi, Florin

On Tue, 10 Mar 2026 at 16:01, Florin Irion <irionr@gmail.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.



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: ALTER TABLE: warn when actions do not recurse to partitions
Next
From: zhanghu
Date:
Subject: Re: Add documentation for PG_ABS_SRCDIR, PG_ABS_BUILDDIR, PG_LIBDIR, PG_DLSUFFIX