2085 Oid table_oid = PG_GETARG_OID(0);
2086 text *att_text = PG_GETARG_TEXT_P(1);
2091 bool only_parent =
false;
2094 if ( ! PG_ARGISNULL(2) )
2100 elog(ERROR,
"stats for \"%s.%s\" do not exist", get_rel_name(table_oid), text_to_cstring(att_text));
2104 json = cstring_to_text(
str);
2107 PG_RETURN_TEXT_P(json);
static ND_STATS * pg_get_nd_stats_by_name(const Oid table_oid, const text *att_text, int mode, bool only_parent)
Pull the stats object from the PgSQL system catalogs.
static char * nd_stats_to_json(const ND_STATS *nd_stats)
Convert an ND_STATS to a JSON representation for external use.
static int text_p_get_mode(const text *txt)
Utility function to see if the first letter of the mode argument is 'N'.
N-dimensional statistics structure.