Commit f15ab129 authored by Paul Ramsey's avatar Paul Ramsey

Change syscache stats lookup to use STATRELATTINH key and three parameters in…

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
parent ec6baaa5
Pipeline #15359196 passed with stage
in 17 minutes 57 seconds
......@@ -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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment