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

Commit103cf75

Browse files
committed
Re-apply range check patch after fixing LIMIT_H test and defines.
1 parentcd5dfb6 commit103cf75

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

‎doc/TODO

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ PARSER
3636
* UNION with LIMIT fails
3737
* Unique index on base column not honored on inserts from inherited table
3838
INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
39+
* CREATE TABLE x AS SELECT 1 UNION SELECT 2 fails
3940

4041
VIEWS
4142

@@ -175,6 +176,7 @@ MISC
175176
* Add PL/Perl(Mark Hollomon)
176177
* Make postgres user have a password by default
177178
* Add configure test to check for C++ need for *.h and namespaces
179+
* Allow BLCKSZ <= 64k, not <= 32k
178180

179181
PERFORMANCE
180182
-----------

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.32 1999/07/0903:27:20 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.33 1999/07/0917:40:31 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
1717
#include<stdio.h>/* for sprintf() */
1818
#include<errno.h>
1919
#include<math.h>
20-
#ifdefHAVE_LIMITS
20+
#ifdefHAVE_LIMITS_H
2121
#include<limits.h>
2222
#endif
2323
#include"postgres.h"
@@ -32,19 +32,19 @@
3232
#defineINT_MAX (0x7FFFFFFFL)
3333
#endif
3434
#ifndefINT_MIN
35-
#defineINT_MIN (-0x80000000L)
35+
#defineINT_MIN (-INT_MAX-1)
3636
#endif
3737
#ifndefSHRT_MAX
3838
#defineSHRT_MAX (0x7FFF)
3939
#endif
4040
#ifndefSHRT_MIN
41-
#defineSHRT_MIN (-0x8000)
41+
#defineSHRT_MIN (-SHRT_MAX-1)
4242
#endif
4343
#ifndefSCHAR_MAX
4444
#defineSCHAR_MAX (0x7F)
4545
#endif
4646
#ifndefSCHAR_MIN
47-
#defineSCHAR_MIN (-0x80)
47+
#defineSCHAR_MIN (-SCHAR_MAX-1)
4848
#endif
4949

5050
int32
@@ -76,7 +76,7 @@ pg_atoi(char *s, int size, int c)
7676
switch (size)
7777
{
7878
casesizeof(int32):
79-
#ifdefHAS_LONG_LONG
79+
#if defined(HAVE_LONG_INT_64)|| defined(HAVE_LONG_LONG_INT_64)
8080
/* won't get ERANGE on these with 64-bit longs... */
8181
if (l<INT_MIN)
8282
{
@@ -88,7 +88,7 @@ pg_atoi(char *s, int size, int c)
8888
errno=ERANGE;
8989
elog(ERROR,"pg_atoi: error reading \"%s\": %m",s);
9090
}
91-
#endif/*HAS_LONG_LONG */
91+
#endif/*HAVE_LONG_INT_64 or HAVE_LONG_LONG_INT_64 */
9292
break;
9393
casesizeof(int16):
9494
if (l<SHRT_MIN)

‎src/interfaces/odbc/gpps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#defineFALSE((BOOL)0)
3737
#endif
3838

39-
#ifHAVE_PARAM_H
39+
#ifHAVE_SYS_PARAM_H
4040
#include<sys/param.h>
4141
#else
4242
#defineMAXPATHLEN255

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp