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

Commit3f828fa

Browse files
committed
Fix array_typanalyze to work for domains over arrays.
Not sure how we missed this case, but we did. Per bug #7551 fromDiego de Lima.
1 parentbcf90cc commit3f828fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include"commands/vacuum.h"
2020
#include"utils/array.h"
2121
#include"utils/datum.h"
22+
#include"utils/lsyscache.h"
2223
#include"utils/typcache.h"
2324

2425

@@ -108,11 +109,10 @@ array_typanalyze(PG_FUNCTION_ARGS)
108109
PG_RETURN_BOOL(false);
109110

110111
/*
111-
* Check attribute data type is a varlena array.
112+
* Check attribute data type is a varlena array (or a domain over one).
112113
*/
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))
116116
elog(ERROR,"array_typanalyze was invoked for non-array type %u",
117117
stats->attrtypid);
118118

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp