Re: Internal error codes triggered by regression tests and user queries, take 2 - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Internal error codes triggered by regression tests and user queries, take 2
Date
Msg-id arJdH4WF14EXwWmt@paquier.xyz
Whole thread
In response to Re: Internal error codes triggered by regression tests and user queries, take 2  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-hackers
On Sat, Sep 12, 2026 at 02:00:00PM +0300, Alexander Lakhin wrote:
> Please look at the attached v3-Define-...patch, where I think I addressed
> all of your comments.

The ACL bits were slightly puzzling because it's the first time I see
this pattern in the code (following Tom's comment upthread also in
tsvector), and I indeed get much better error messages:
=# SELECT acldefault(E'\x80'::"char", 0);
ERROR:  22021: invalid byte sequence for encoding "UTF8": 0x80
=# SELECT acldefault(chr(1)::"char", 10);
ERROR:  22023: unrecognized object type abbreviation: "\001"

The second query just showed nothing originally.

For the typmods, %d is a better choice to me as the input is an
integer.

As a whole, that looks OK, so applied on HEAD.  I did not look at
0002.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Maxime Schoemans
Date:
Subject: Re: Set calcSumX2 = true in numeric_(poly_)deserialize
Next
From: Nisha Moond
Date:
Subject: Re: Crashes on a partition whose concurrent detach never finished