BUG #18937: New error class 10 for XQuery errors lacks a "standard" error code

PG Bug reporting form <noreply@postgresql.org>

From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: borz_off@cs.msu.su
Date: 2025-05-27T10:11:58Z
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18937
Logged by:          Alexey Borzov
Email address:      borz_off@cs.msu.su
PostgreSQL version: 18beta1
Operating system:   Irrelevant
Description:        

The docs for Postgres error codes (
https://www.postgresql.org/docs/18/errcodes-appendix.html ) claim:
>  For each error class there is a “standard” error code having the last
three characters 000. This code is used only for error conditions that fall
within the class but do not have any more-specific code assigned.
However, the new class "Class 10 — XQuery Error" described on the same page
has only a single specific error code
> 10608         invalid_argument_for_xquery
code 10000 is not available
This is the commit that introduced it:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cd838e200880c6f52c5b5e30887e5ff584876bef

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Neaten up our choices of SQLSTATEs for XML-related errors.