77 * Portions Copyright (c) 1996-2009, 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.84 2009/03/23 21:00:39 adunstan Exp $
10+ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.85 2009/03/27 18:56:57 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -1627,7 +1627,8 @@ map_sql_value_to_xml_value(Datum value, Oid type)
16271627if (DATE_NOT_FINITE (date ))
16281628ereport (ERROR ,
16291629(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
1630- errmsg ("date out of range" )));
1630+ errmsg ("date out of range" ),
1631+ errdetail ("XML does not support infinite date values." )));
16311632j2date (date + POSTGRES_EPOCH_JDATE ,
16321633& (tm .tm_year ),& (tm .tm_mon ),& (tm .tm_mday ));
16331634EncodeDateOnly (& tm ,USE_XSD_DATES ,buf );
@@ -1649,7 +1650,8 @@ map_sql_value_to_xml_value(Datum value, Oid type)
16491650if (TIMESTAMP_NOT_FINITE (timestamp ))
16501651ereport (ERROR ,
16511652(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
1652- errmsg ("timestamp out of range" )));
1653+ errmsg ("timestamp out of range" ),
1654+ errdetail ("XML does not support infinite timestamp values." )));
16531655else if (timestamp2tm (timestamp ,NULL ,& tm ,& fsec ,NULL ,NULL )== 0 )
16541656EncodeDateTime (& tm ,fsec ,NULL ,& tzn ,USE_XSD_DATES ,buf );
16551657else
@@ -1675,7 +1677,8 @@ map_sql_value_to_xml_value(Datum value, Oid type)
16751677if (TIMESTAMP_NOT_FINITE (timestamp ))
16761678ereport (ERROR ,
16771679(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
1678- errmsg ("timestamp out of range" )));
1680+ errmsg ("timestamp out of range" ),
1681+ errdetail ("XML does not support infinite timestamp values." )));
16791682else if (timestamp2tm (timestamp ,& tz ,& tm ,& fsec ,& tzn ,NULL )== 0 )
16801683EncodeDateTime (& tm ,fsec ,& tz ,& tzn ,USE_XSD_DATES ,buf );
16811684else