From: Paul Ramsey Date: Wed, 20 Dec 2017 23:09:33 +0000 (+0000) Subject: Change syscache stats lookup to use STATRELATTINH key and three parameters in all... X-Git-Tag: 2.4.3rc1~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f15ab129c7c520fb3f972f0067fa4b327eeeb645;p=postgis Change syscache stats lookup to use STATRELATTINH key and three parameters in all cases for 2.4 branch. Closes #3904 git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@16176 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c index 46256a4a5..1a1c1dfea 100644 --- a/postgis/gserialized_estimate.c +++ b/postgis/gserialized_estimate.c @@ -889,7 +889,7 @@ pg_get_nd_stats(const Oid table_oid, AttrNumber att_num, int mode, bool only_par if ( ! only_parent ) { POSTGIS_DEBUGF(2, "searching whole tree stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL"); - stats_tuple = SearchSysCache3(STATRELATT, table_oid, att_num, TRUE); + stats_tuple = SearchSysCache3(STATRELATTINH, ObjectIdGetDatum(table_oid), Int16GetDatum(att_num), BoolGetDatum(true)); if ( stats_tuple ) POSTGIS_DEBUGF(2, "found whole tree stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL"); } @@ -897,7 +897,7 @@ pg_get_nd_stats(const Oid table_oid, AttrNumber att_num, int mode, bool only_par if ( only_parent || ! stats_tuple ) { POSTGIS_DEBUGF(2, "searching parent table stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL"); - stats_tuple = SearchSysCache2(STATRELATT, table_oid, att_num); + stats_tuple = SearchSysCache3(STATRELATTINH, ObjectIdGetDatum(table_oid), Int16GetDatum(att_num), BoolGetDatum(false)); if ( stats_tuple ) POSTGIS_DEBUGF(2, "found parent table stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL"); }