]> 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 23:09:33 +0000 (23:09 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 20 Dec 2017 23:09:33 +0000 (23:09 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@16176 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/gserialized_estimate.c

index 46256a4a5b6253661fc906cb8e40340e03599928..1a1c1dfead995fb91a20529fabf059f187b4aa47 100644 (file)
@@ -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");
        }