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

Commit 05f4397

Browse files
committed
Add proper mapping of boolean type data to XML Schema.
1 parent 4ab8fcb commit 05f4397

File tree

1 file changed

+9
-1
lines changed
  • src/backend/utils/adt

1 file changed

+9
-1
lines changed

src/backend/utils/adt/xml.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.25 2007/02/03 14:06:55 petere Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.26 2007/02/10 18:47:41 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1482,6 +1482,14 @@ map_sql_value_to_xml_value(Datum value, Oid type)
14821482
bool isvarlena;
14831483
char *p, *str;
14841484

1485+
if (type == BOOLOID)
1486+
{
1487+
if (DatumGetBool(value))
1488+
return "true";
1489+
else
1490+
return "false";
1491+
}
1492+
14851493
getTypeOutputInfo(type, &typeOut, &isvarlena);
14861494
str = OidOutputFunctionCall(typeOut, value);
14871495

0 commit comments

Comments
 (0)