Re: Wrong argument name in error message from attribute_stats functions - Mailing list pgsql-hackers

From Ilia Evdokimov
Subject Re: Wrong argument name in error message from attribute_stats functions
Date
Msg-id ff677e97-9f0e-4973-a3c1-4cebeddac41f@tantorlabs.com
Whole thread
In response to Re: Wrong argument name in error message from attribute_stats functions  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Wrong argument name in error message from attribute_stats functions
List pgsql-hackers
On 7/10/26 15:32, Fujii Masao wrote:

> On Fri, Jul 10, 2026 at 9:11 PM Ilia Evdokimov
> <ilya.evdokimov@tantorlabs.com> wrote:
>> Hi,
>>
>> While using pg_clear_attribute_stats() I noticed weird printing:
>>
>> ```
>> CREATE TABLE t(a int);
>> SELECT pg_clear_attribute_stats(NULL, 't', 'a', false);
>> ERROR:  argument "relation" must not be null
>> ```
>>
>> NULL was passed for `schemaname`, not for a `relation` argument. This
>> comes from cleararginfo[], where both the schema and relname entries are
>> labeled `relation`.
>>
>> In v1-patch I propose naming these the same way `pg_proc.dat` does, i.e.
>> `schemaname` and `relname`.
> Thanks for the patch! LGTM.

Since Beta 2 is scheduled for July 16, it might be worth getting this 
fixed before then. Incorrect error messages can mislead users during 
debugging.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/




pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Fix publisher-side sequence permission reporting
Next
From: Rui Zhao
Date:
Subject: Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement