Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4eeda92

Browse files
committed
Fix ANALYZE failure on a column that's a domain over a range.
Most other range operations seem to work all right on domains,but this one not so much, at least not since commit918eee0.Per bug #8684 from Brett Neumeier.
1 parentd43760b commit4eeda92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/utils/adt/rangetypes_typanalyze.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include"catalog/pg_operator.h"
2828
#include"commands/vacuum.h"
2929
#include"utils/builtins.h"
30+
#include"utils/lsyscache.h"
3031
#include"utils/rangetypes.h"
3132

3233
staticintfloat8_qsort_cmp(constvoid*a1,constvoid*a2);
@@ -44,8 +45,8 @@ range_typanalyze(PG_FUNCTION_ARGS)
4445
TypeCacheEntry*typcache;
4546
Form_pg_attributeattr=stats->attr;
4647

47-
/* Get information about range type */
48-
typcache=range_get_typcache(fcinfo,stats->attrtypid);
48+
/* Get information about range type; note column might be a domain */
49+
typcache=range_get_typcache(fcinfo,getBaseType(stats->attrtypid));
4950

5051
if (attr->attstattarget<0)
5152
attr->attstattarget=default_statistics_target;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp