Standardize the definition of the subtype field of AlterDomainStmt

From: Quan Zongliang <quanzongliang(at)yeah(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Standardize the definition of the subtype field of AlterDomainStmt
Date: 2025-05-27 03:06:46
Message-ID: 41ff310b-16bd-44b9-a3ef-97e20f14b709@yeah.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I noticed that the subtype of AlterDomainStmt is directly using
constants in the code. It is not conducive to the maintenance and
reading of the code. Based on the definition of AlterTableType, use
"AD_" as the prefix. Define several macros to replace the original
characters.
The subtype of AlterTableCmd is defined using an enumeration. The
subtypes of AlterDomainStmt are relatively few in number, and the
original definition uses characters. These definitions still use
characters and maintain the values unchanged. If some plugins or tools
are also processing AlterDomainStmt, there will be no errors.

--
Quan Zongliang

Attachment Content-Type Size
alterdomain_subtype.patch text/plain 5.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-05-27 03:21:01 Re: doc: Make logical replication examples executable in bulk and legal sgml.
Previous Message jian he 2025-05-27 02:03:58 Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION