On Sun, Sep 13, 2026 at 12:50 AM Ayush Tiwari
<[email protected]> wrote:
> I've added it for now, but personally I don't think it is required.
I agree that the additional test isn't necessary here.
- (errmsg("Unicode categorization can only be performed if server
encoding is UTF8")));
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Unicode categorization can only be performed if server
encoding is UTF8")));
unicode_norm_form_from_string() and str_casefold() have similar encoding
checks, but use ERRCODE_SYNTAX_ERROR. I think
ERRCODE_FEATURE_NOT_SUPPORTED is more appropriate, so I'd keep it here.
Should we change those two checks to use it too?
if (!crc_ok)
ereport(ERROR,
- (errmsg("calculated CRC checksum does not match value stored in file")));
+ (errcode(ERRCODE_DATA_CORRUPTED),
+ errmsg("calculated CRC checksum does not match value stored in file")));
perform_base_backup() has the same control-file CRC check without
an errcode(). Should we add ERRCODE_DATA_CORRUPTED there as well?
> (PS. This patch is intended for master only)
+1
Regards,
--
Fujii Masao