PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ pg_get_nd_stats_by_name()

static ND_STATS * pg_get_nd_stats_by_name ( const Oid  table_oid,
const text *  att_text,
int  mode,
bool  only_parent 
)
static

Pull the stats object from the PgSQL system catalogs.

The debugging functions are taking human input (table names) and columns, so we have to look those up first. In case of parent tables with INHERITS, when "only_parent" is true this function only searches for stats in the parent table ignoring any statistic collected from the children.

Definition at line 852 of file gserialized_estimate.c.

853{
854 const char *att_name = text_to_cstring(att_text);
855 AttrNumber att_num;
856
857 /* We know the name? Look up the num */
858 if ( att_text )
859 {
860 /* Get the attribute number */
861 att_num = get_attnum(table_oid, att_name);
862 if ( ! att_num ) {
863 elog(ERROR, "attribute \"%s\" does not exist", att_name);
864 return NULL;
865 }
866 }
867 else
868 {
869 elog(ERROR, "attribute name is null");
870 return NULL;
871 }
872
873 return pg_get_nd_stats(table_oid, att_num, mode, only_parent);
874}
static ND_STATS * pg_get_nd_stats(const Oid table_oid, AttrNumber att_num, int mode, bool only_parent)
Pull the stats object from the PgSQL system catalogs.

References pg_get_nd_stats().

Referenced by _postgis_gserialized_joinsel(), _postgis_gserialized_sel(), _postgis_gserialized_stats(), and gserialized_estimated_extent().

Here is the call graph for this function:
Here is the caller graph for this function: