File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 19
19
#include "commands/vacuum.h"
20
20
#include "utils/array.h"
21
21
#include "utils/datum.h"
22
+ #include "utils/lsyscache.h"
22
23
#include "utils/typcache.h"
23
24
24
25
@@ -108,11 +109,10 @@ array_typanalyze(PG_FUNCTION_ARGS)
108
109
PG_RETURN_BOOL (false);
109
110
110
111
/*
111
- * Check attribute data type is a varlena array.
112
+ * Check attribute data type is a varlena array (or a domain over one) .
112
113
*/
113
- element_typeid = stats -> attrtype -> typelem ;
114
-
115
- if (!OidIsValid (element_typeid ) || stats -> attrtype -> typlen != -1 )
114
+ element_typeid = get_base_element_type (stats -> attrtypid );
115
+ if (!OidIsValid (element_typeid ))
116
116
elog (ERROR , "array_typanalyze was invoked for non-array type %u" ,
117
117
stats -> attrtypid );
118
118
You can’t perform that action at this time.
0 commit comments