Re: statatt_build_stavalues->LOCAL_FCINFO wrong number
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-06-30T04:20:57Z
Lists: pgsql-hackers
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"?
Commits
-
Simplify some stats restore code with InputFunctionCallSafe()
- ac536a4061bc 19 (unreleased) landed
- efa59a500457 master landed
-
Move attribute statistics functions to stat_utils.c
- 213a1b895270 19 (unreleased) cited