1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Remove user-selectable ANALYZE option for range types.

It's not clear that a per-datatype typanalyze function would be any more
useful than a generic typanalyze for ranges.  What *is* clear is that
letting unprivileged users select typanalyze functions is a crash risk or
worse.  So remove the option from CREATE TYPE AS RANGE, and instead put in
a generic typanalyze function for ranges.  The generic function does
nothing as yet, but hopefully we'll improve that before 9.2 release.
This commit is contained in:
Tom Lane
2011-11-23 00:03:22 -05:00
parent df73584431
commit 74c1723fc8
8 changed files with 36 additions and 40 deletions

View File

@@ -1135,6 +1135,23 @@ hash_range(PG_FUNCTION_ARGS)
PG_RETURN_INT32(result);
}
/* ANALYZE support */
/* typanalyze function for range datatypes */
Datum
range_typanalyze(PG_FUNCTION_ARGS)
{
/*
* For the moment, just punt and don't analyze range columns. If we
* get close to release without having a better answer, we could
* consider letting std_typanalyze do what it can ... but those stats
* are probably next door to useless for most activity with range
* columns, so it's not clear it's worth gathering them.
*/
PG_RETURN_BOOL(false);
}
/*
*----------------------------------------------------------
* CANONICAL FUNCTIONS