From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: refactor AlterDomainAddConstraint (alter domain add constraint) |
Date: | 2024-12-06 14:48:37 |
Message-ID: | 202412061448.ont2q5bctxfm@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-Dec-06, jian he wrote:
> basically processCASbits
> from
> processCASbits($3, @3, "NOT NULL")
> processCASbits($5, @5, "CHECK")
> to
> processCASbits($3, @3, "DOMAIN with NOT NULL")
> processCASbits($5, @5, "DOMAIN with CHECK")
This doesn't actually work from a translation point of view, because the
actual error message is split in two parts. I think it might be better
to pass a non-NULL variable to processCASbits, then in the caller check
whether that flag is true; if so, raise the error in a single ereport().
BTW the way to test this is to apply your patch, then do "make
update-po", then look at the src/backend/po/*.po.new files which contain
the merged strings. In this case, your new "DOMAIN with NOT NULL" string
is not going to appear in the message catalog, because processCASbits()
is not listed in GETTEXT_TRIGGERS in nls.mk.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2024-12-06 15:39:43 | Re: Popcount optimization using SVE for ARM |
Previous Message | Alvaro Herrera | 2024-12-06 14:01:03 | Re: Pass ParseState as down to utility functions. |