diff options
| author | Tom Lane | 2011-11-23 05:03:22 +0000 |
|---|---|---|
| committer | Tom Lane | 2011-11-23 05:03:22 +0000 |
| commit | 74c1723fc8dca2d70576ef2f0a66f4a7c99c173a (patch) | |
| tree | a55cb1107a595453641f67d38774550969ed479e /src/backend/utils | |
| parent | df73584431e7edb1dd76578777bd0fcc17b916a1 (diff) | |
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.
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/adt/rangetypes.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/backend/utils/adt/rangetypes.c b/src/backend/utils/adt/rangetypes.c index 3326cb17c89..4b27d4317fb 100644 --- a/src/backend/utils/adt/rangetypes.c +++ b/src/backend/utils/adt/rangetypes.c @@ -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 |
