Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8d4b311

Browse files
committed
Make pg_get_statisticsobjdef_expressions return NULL
The usual behavior for functions in ruleutils.c is to return NULL whenthe object does not exist. pg_get_statisticsobjdef_expressions raised anerror instead, so correct that.Reported-by: Justin PryzbyDiscussion:https://postgr.es/m/20210505210947.GA27406%40telsasoft.com
1 parentb65431c commit8d4b311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/ruleutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,9 +1759,9 @@ pg_get_statisticsobjdef_expressions(PG_FUNCTION_ARGS)
17591759
statexttup=SearchSysCache1(STATEXTOID,ObjectIdGetDatum(statextid));
17601760

17611761
if (!HeapTupleIsValid(statexttup))
1762-
elog(ERROR,"cache lookup failed for statistics object %u",statextid);
1762+
PG_RETURN_NULL();
17631763

1764-
/*has thestatistics expressions? */
1764+
/*Does thestats object have expressions? */
17651765
has_exprs= !heap_attisnull(statexttup,Anum_pg_statistic_ext_stxexprs,NULL);
17661766

17671767
/* no expressions? we're done */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp