Re: statatt_build_stavalues->LOCAL_FCINFO wrong number

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: statatt_build_stavalues->LOCAL_FCINFO wrong number
Date: 2026-06-30 15:18:30
Message-ID: CADkLM=faNcbvHr4pc6L1h-B1qTiPxbQDDZJgbmFnVJBJtREmcA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 29, 2026, 11:21 PM jian he <jian(dot)universality(at)gmail(dot)com> wrote:

> Hi.
>
> I have one more tiny question...
>
>
> pg_restore_attribute_stats->attribute_statistics_update->statatt_build_stavalues->FunctionCallInvoke
> which may fail, causing pg_restore_attribute_stats to return false.
>
> / * Parameters corresponding to ANYARRAY columns are instead passed in as
> text
> * values, which is a valid input string for an array of the type or
> element
> * type of the attribute. Any error generated by the array_in() function
> will
> * in turn fail the function.
> */
>
> To me, the phrase "fail the function" suggests that it raises
> ereport(ERROR), rather than simply returning false.
> However, here, array_in() does not appear to trigger a hard
> ereport(ERROR). Instead, it causes attribute_statistics_update() to return
> false.
> Because of that, I'm not sure what the last sentence is trying to convey.
> Does
> "fail the function" mean "cause the function to return false" rather than
> "raise
> an error"?
>

We want to return false. We can reword the comment.

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2026-06-30 15:25:13 Re: occasional ECPG failures on dikkop (FreeBSD)
Previous Message Yugo Nagata 2026-06-30 15:04:01 Re: Incremental View Maintenance, take 2 (design considerations)