]> granicus.if.org Git - postgis/commitdiff
Change syscache stats lookup to use STATRELATTINH key and three parameters in all...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 20 Dec 2017 22:57:42 +0000 (22:57 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 20 Dec 2017 22:57:42 +0000 (22:57 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16175 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/gserialized_estimate.c

index ad9a42ac1b6134d29fd5bed427a5275cc1c2a38d..8fa9f612bf1668287a46a3708374642b9ddd41d4 100644 (file)
@@ -935,7 +935,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");
        }
@@ -943,7 +943,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");
        }