Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite472f13

Browse files
committed
Better fix for determining minimum and maximum int64 values that doesn't
require stdint.h and works for "busted" int64.
1 parent8d2b05d commite472f13

File tree

1 file changed

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

1 file changed

+3
-6
lines changed

‎src/backend/utils/adt/xml.c

Lines changed: 3 additions & 6 deletions
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.30 2007/02/1610:42:31 petere Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.31 2007/02/1618:37:43 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -40,10 +40,6 @@
4040

4141
#include"postgres.h"
4242

43-
#ifdefHAVE_STDINT_H
44-
#include<stdint.h>
45-
#endif
46-
4743
#ifdefUSE_LIBXML
4844
#include<libxml/chvalid.h>
4945
#include<libxml/parser.h>
@@ -2189,7 +2185,8 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
21892185
" <xsd:maxInclusive value=\""INT64_FORMAT"\"/>\n"
21902186
" <xsd:minInclusive value=\""INT64_FORMAT"\"/>\n"
21912187
" </xsd:restriction>\n",
2192-
INT64_MAX,INT64_MIN);
2188+
-((INT64CONST(1) << (sizeof(int64)*8-1))+1),
2189+
(INT64CONST(1) << (sizeof(int64)*8-1)));
21932190
break;
21942191

21952192
caseFLOAT4OID:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp