Re: Standardize the definition of the subtype field of AlterDomainStmt - Mailing list pgsql-hackers

From wenhui qiu
Subject Re: Standardize the definition of the subtype field of AlterDomainStmt
Date
Msg-id CAGjGUAKndKuiE3ds-Nq9ir0oTwb+5KxSR=SGy-JMk7SPnv5T+w@mail.gmail.com
Whole thread Raw
List pgsql-hackers
HI 
Thank you for your update ,I marked the path as "Ready for Committer"



Thank 

On Wed, May 28, 2025 at 10:27 AM Quan Zongliang <quanzongliang@yeah.net> wrote:


On 2025/5/27 11:54, Michael Paquier wrote:
> On Tue, May 27, 2025 at 11:06:46AM +0800, Quan Zongliang wrote:
>> 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.
>
> Sounds like a good idea.  As far as I can see after a closer lookup at
> the tree, you have updated all the code paths that matter for this
> change, and you have added a CF entry:
> https://commitfest.postgresql.org/patch/5780/
>
> +#define AD_VaidateConstraint       'V'         /* VALIDATE CONSTRAINT */
>
Updated
Thank you.

> s/Vaidate/Validate
> --
> Michael

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Assertion failure in smgr.c when using pg_prewarm with partitioned tables
Next
From: David Rowley
Date:
Subject: Re: Speed up JSON escape processing with SIMD plus other optimisations