Re: refactor AlterDomainAddConstraint (alter domain add constraint)
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: jian he <jian.universality@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-12-06T14:48:37Z
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)
Commits
-
Fix bogus grammar for a CREATE CONSTRAINT TRIGGER error
- 87251e114967 19 (unreleased) cited
-
Remove dead code
- 7407b2d48cf3 18.0 landed