Re: Internal error codes triggered by regression tests and user queries, take 2

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: Internal error codes triggered by regression tests and user queries, take 2
Date: 2026-09-22 10:49:03
Message-ID: arJdH4WF14EXwWmt@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2026-09-22 11:01:10 Re: Crashes on a partition whose concurrent detach never finished
Previous Message Maxime Schoemans 2026-09-22 10:24:23 Re: Set calcSumX2 = true in numeric_(poly_)deserialize