Make use of PG_INT64_MAX/PG_INT64_MIN
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 22 Sep 2021 05:31:05 +0000 (07:31 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 22 Sep 2021 05:31:05 +0000 (07:31 +0200)
This code was written before those symbols were introduced, but now we
can simplify it.

src/backend/utils/adt/xml.c

index ba90187f8b891f2b258d7c3fe5f6cbb1bd09ceae..60d4dd86f7fc641438fa941e70123f505d7d3665 100644 (file)
@@ -3637,8 +3637,8 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
                                 "    <xsd:maxInclusive value=\"" INT64_FORMAT "\"/>\n"
                                 "    <xsd:minInclusive value=\"" INT64_FORMAT "\"/>\n"
                                 "  </xsd:restriction>\n",
-                                (((uint64) 1) << (sizeof(int64) * 8 - 1)) - 1,
-                                (((uint64) 1) << (sizeof(int64) * 8 - 1)));
+                                PG_INT64_MAX,
+                                PG_INT64_MIN);
                break;
 
            case FLOAT4OID: