From: Michael Paquier <michael@paquier.xyz>
To: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: hackerzheng666@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19629: pg_restore_relation_stats reports XX000 instead of proper SQLSTATE for input validation errors
Date: Fri, 21 Aug 2026 07:30:53 +0900
Message-ID: <aoeAHXVBs8S5mk-c@paquier.xyz> (raw)
In-Reply-To: <CAJTYsWX8WYhEC-A92cfDGSUxOZmk474_knCnwYmUiXELQnPtGA@mail.gmail.com>
References: <19629-76babc04b683594d@postgresql.org>
<CAHGQGwHZLiLa9iM7NAiugp1B7CumN94=YBeho9t=qKJMnTGwMQ@mail.gmail.com>
<CAJTYsWX8WYhEC-A92cfDGSUxOZmk474_knCnwYmUiXELQnPtGA@mail.gmail.com>
On Wed, Aug 19, 2026 at 09:42:18PM +0530, Ayush Tiwari wrote:
> On Wed, 19 Aug 2026 at 20:52, Fujii Masao <masao.fujii@gmail.com> wrote:
>> I think this should be backpatched to v18, where
>> pg_restore_relation_stats() and pg_restore_attribute_stats() were
>> introduced.
>>
>> Thought?
Adding an errcode() is a life improvement thing. So, while I agree
that the proposed patch is an improvement, I don't see a strong need
for a backpatch. Feel free to override this argument as you feel, of
course.
Just a note: I've tried to be careful with assigning errcodes for all
the new error paths of extended_stats_funcs.c added in v19 that can be
reached by SQL. If there are holes in there, please let me know.
> Found some more places where the issue exists and added
> there. Maybe you can incorporate those too in your patch?
I'd suggest to keep things isolated in their own fashion, as they
address different areas with slightly different user-changes changes
(okay, not much).
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, ayushtiwari.slg01@gmail.com, masao.fujii@gmail.com, hackerzheng666@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19629: pg_restore_relation_stats reports XX000 instead of proper SQLSTATE for input validation errors
In-Reply-To: <aoeAHXVBs8S5mk-c@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox