Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bc61878

Browse files
committed
Fix map_sql_value_to_xml_value() to treat domains like their base types.
This was already the case for domains over arrays, but not for domains over certain built-in types such as boolean. The special formatting rules for those types should apply to domains over them as well. Per discussion. While this is a bug fix, it's also a behavioral change that seems likely to trip up some applications. So no back-patch. Pavel Stehule
1 parent 3bf3ab8 commit bc61878

File tree

1 file changed

+6
-0
lines changed
  • src/backend/utils/adt

1 file changed

+6
-0
lines changed

src/backend/utils/adt/xml.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,12 @@ map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings)
20012001
bool isvarlena;
20022002
char *str;
20032003

2004+
/*
2005+
* Flatten domains; the special-case treatments below should apply
2006+
* to, eg, domains over boolean not just boolean.
2007+
*/
2008+
type = getBaseType(type);
2009+
20042010
/*
20052011
* Special XSD formatting for some data types
20062012
*/

0 commit comments

Comments
 (0)