Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f512a6e1
Commit
f512a6e1
authored
Dec 12, 2017
by
Andres Freund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistently use PG_INT(16|32|64)_(MIN|MAX).
Per buildfarm animal woodlouse.
parent
4c6744ed
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
13 deletions
+13
-13
contrib/btree_gist/btree_cash.c
contrib/btree_gist/btree_cash.c
+1
-1
contrib/btree_gist/btree_int2.c
contrib/btree_gist/btree_int2.c
+1
-1
contrib/btree_gist/btree_int4.c
contrib/btree_gist/btree_int4.c
+1
-1
contrib/btree_gist/btree_int8.c
contrib/btree_gist/btree_int8.c
+1
-1
src/backend/utils/adt/int.c
src/backend/utils/adt/int.c
+3
-3
src/backend/utils/adt/int8.c
src/backend/utils/adt/int8.c
+5
-5
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numeric.c
+1
-1
No files found.
contrib/btree_gist/btree_cash.c
View file @
f512a6e1
...
...
@@ -101,7 +101,7 @@ cash_dist(PG_FUNCTION_ARGS)
Cash
ra
;
if
(
pg_sub_s64_overflow
(
a
,
b
,
&
r
)
||
r
==
INT64_MIN
)
r
==
PG_
INT64_MIN
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"money out of range"
)));
...
...
contrib/btree_gist/btree_int2.c
View file @
f512a6e1
...
...
@@ -100,7 +100,7 @@ int2_dist(PG_FUNCTION_ARGS)
int16
ra
;
if
(
pg_sub_s16_overflow
(
a
,
b
,
&
r
)
||
r
==
INT16_MIN
)
r
==
PG_
INT16_MIN
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"smallint out of range"
)));
...
...
contrib/btree_gist/btree_int4.c
View file @
f512a6e1
...
...
@@ -101,7 +101,7 @@ int4_dist(PG_FUNCTION_ARGS)
int32
ra
;
if
(
pg_sub_s32_overflow
(
a
,
b
,
&
r
)
||
r
==
INT32_MIN
)
r
==
PG_
INT32_MIN
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"integer out of range"
)));
...
...
contrib/btree_gist/btree_int8.c
View file @
f512a6e1
...
...
@@ -101,7 +101,7 @@ int8_dist(PG_FUNCTION_ARGS)
int64
ra
;
if
(
pg_sub_s64_overflow
(
a
,
b
,
&
r
)
||
r
==
INT64_MIN
)
r
==
PG_
INT64_MIN
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"bigint out of range"
)));
...
...
src/backend/utils/adt/int.c
View file @
f512a6e1
...
...
@@ -794,7 +794,7 @@ int2div(PG_FUNCTION_ARGS)
*/
if
(
arg2
==
-
1
)
{
if
(
unlikely
(
arg1
==
INT16_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT16_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"smallint out of range"
)));
...
...
@@ -1018,7 +1018,7 @@ int4abs(PG_FUNCTION_ARGS)
int32
arg1
=
PG_GETARG_INT32
(
0
);
int32
result
;
if
(
unlikely
(
arg1
==
INT32_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT32_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"integer out of range"
)));
...
...
@@ -1032,7 +1032,7 @@ int2abs(PG_FUNCTION_ARGS)
int16
arg1
=
PG_GETARG_INT16
(
0
);
int16
result
;
if
(
unlikely
(
arg1
==
INT16_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT16_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"smallint out of range"
)));
...
...
src/backend/utils/adt/int8.c
View file @
f512a6e1
...
...
@@ -103,7 +103,7 @@ scanint8(const char *str, bool errorOK, int64 *result)
if
(
!
neg
)
{
if
(
unlikely
(
tmp
==
INT64_MIN
))
if
(
unlikely
(
tmp
==
PG_
INT64_MIN
))
goto
out_of_range
;
tmp
=
-
tmp
;
}
...
...
@@ -564,7 +564,7 @@ int8div(PG_FUNCTION_ARGS)
*/
if
(
arg2
==
-
1
)
{
if
(
unlikely
(
arg1
==
INT64_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT64_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"bigint out of range"
)));
...
...
@@ -588,7 +588,7 @@ int8abs(PG_FUNCTION_ARGS)
int64
arg1
=
PG_GETARG_INT64
(
0
);
int64
result
;
if
(
unlikely
(
arg1
==
INT64_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT64_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"bigint out of range"
)));
...
...
@@ -822,7 +822,7 @@ int84div(PG_FUNCTION_ARGS)
*/
if
(
arg2
==
-
1
)
{
if
(
unlikely
(
arg1
==
INT64_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT64_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"bigint out of range"
)));
...
...
@@ -964,7 +964,7 @@ int82div(PG_FUNCTION_ARGS)
*/
if
(
arg2
==
-
1
)
{
if
(
unlikely
(
arg1
==
INT64_MIN
))
if
(
unlikely
(
arg1
==
PG_
INT64_MIN
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE
),
errmsg
(
"bigint out of range"
)));
...
...
src/backend/utils/adt/numeric.c
View file @
f512a6e1
...
...
@@ -6226,7 +6226,7 @@ numericvar_to_int64(const NumericVar *var, int64 *result)
if
(
!
neg
)
{
if
(
unlikely
(
val
==
INT64_MIN
))
if
(
unlikely
(
val
==
PG_
INT64_MIN
))
return
false
;
val
=
-
val
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment