diff options
Diffstat (limited to 'src/backend/utils/adt')
| -rw-r--r-- | src/backend/utils/adt/format_type.c | 14 | ||||
| -rw-r--r-- | src/backend/utils/adt/ruleutils.c | 2 | ||||
| -rw-r--r-- | src/backend/utils/adt/selfuncs.c | 2 | ||||
| -rw-r--r-- | src/backend/utils/adt/xml.c | 2 |
4 files changed, 9 insertions, 11 deletions
diff --git a/src/backend/utils/adt/format_type.c b/src/backend/utils/adt/format_type.c index 8fd551ef84..f6f5efe126 100644 --- a/src/backend/utils/adt/format_type.c +++ b/src/backend/utils/adt/format_type.c @@ -134,18 +134,16 @@ format_type_internal(Oid type_oid, int32 typemod, typeform = (Form_pg_type) GETSTRUCT(tuple); /* - * Check if it's an array (and not a domain --- we don't want to show the - * substructure of a domain type). Fixed-length array types such as - * "name" shouldn't get deconstructed either. As of Postgres 8.1, rather - * than checking typlen we check the toast property, and don't deconstruct - * "plain storage" array types --- this is because we don't want to show - * oidvector as oid[]. + * Check if it's a regular (variable length) array type. Fixed-length + * array types such as "name" shouldn't get deconstructed. As of Postgres + * 8.1, rather than checking typlen we check the toast property, and don't + * deconstruct "plain storage" array types --- this is because we don't + * want to show oidvector as oid[]. */ array_base_type = typeform->typelem; if (array_base_type != InvalidOid && - typeform->typstorage != 'p' && - typeform->typtype != TYPTYPE_DOMAIN) + typeform->typstorage != 'p') { /* Switch our attention to the array element type */ ReleaseSysCache(tuple); diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 22ba948e73..d4279c0f4e 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -4850,7 +4850,7 @@ get_rule_expr(Node *node, deparse_context *context, appendStringInfo(buf, " %s %s (", generate_operator_name(expr->opno, exprType(arg1), - get_element_type(exprType(arg2))), + get_base_element_type(exprType(arg2))), expr->useOr ? "ANY" : "ALL"); get_rule_expr_paren(arg2, context, true, node); appendStringInfoChar(buf, ')'); diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index ce6d4e2a79..c7442218a8 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -1704,7 +1704,7 @@ scalararraysel(PlannerInfo *root, rightop = (Node *) lsecond(clause->args); /* get nominal (after relabeling) element type of rightop */ - nominal_element_type = get_element_type(exprType(rightop)); + nominal_element_type = get_base_element_type(exprType(rightop)); if (!OidIsValid(nominal_element_type)) return (Selectivity) 0.5; /* probably shouldn't happen */ diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index a94a457cac..6e9c7fe2b0 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -1615,7 +1615,7 @@ map_xml_name_to_sql_identifier(char *name) char * map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings) { - if (type_is_array(type)) + if (type_is_array_domain(type)) { ArrayType *array; Oid elmtype; |
