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
b5c4b772
Commit
b5c4b772
authored
Sep 29, 1999
by
Jan Wieck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added nbtree operator class for NUMERIC
Jan
parent
a6528e08
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
6 deletions
+50
-6
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numeric.c
+29
-1
src/include/catalog/pg_amop.h
src/include/catalog/pg_amop.h
+11
-1
src/include/catalog/pg_amproc.h
src/include/catalog/pg_amproc.h
+2
-1
src/include/catalog/pg_opclass.h
src/include/catalog/pg_opclass.h
+3
-1
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+3
-1
src/include/utils/builtins.h
src/include/utils/builtins.h
+2
-1
No files found.
src/backend/utils/adt/numeric.c
View file @
b5c4b772
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* 1998 Jan Wieck
* 1998 Jan Wieck
*
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.
19 1999/07/17 20:17:58 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.
20 1999/09/29 21:13:25 wieck
Exp $
*
*
* ----------
* ----------
*/
*/
...
@@ -690,6 +690,34 @@ numeric_floor(Numeric num)
...
@@ -690,6 +690,34 @@ numeric_floor(Numeric num)
*/
*/
int32
numeric_cmp
(
Numeric
num1
,
Numeric
num2
)
{
int
result
;
NumericVar
arg1
;
NumericVar
arg2
;
if
(
num1
==
NULL
||
num2
==
NULL
)
return
(
int32
)
0
;
if
(
NUMERIC_IS_NAN
(
num1
)
||
NUMERIC_IS_NAN
(
num2
))
return
(
int32
)
0
;
init_var
(
&
arg1
);
init_var
(
&
arg2
);
set_var_from_num
(
num1
,
&
arg1
);
set_var_from_num
(
num2
,
&
arg2
);
result
=
cmp_var
(
&
arg1
,
&
arg2
);
free_var
(
&
arg1
);
free_var
(
&
arg2
);
return
(
int32
)((
result
==
0
)
?
0
:
((
result
<
0
)
?
-
1
:
1
));
}
bool
bool
numeric_eq
(
Numeric
num1
,
Numeric
num2
)
numeric_eq
(
Numeric
num1
,
Numeric
num2
)
{
{
...
...
src/include/catalog/pg_amop.h
View file @
b5c4b772
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_amop.h,v 1.2
3 1999/04/03 18:07:47 tgl
Exp $
* $Id: pg_amop.h,v 1.2
4 1999/09/29 21:13:30 wieck
Exp $
*
*
* NOTES
* NOTES
* the genbki.sh script reads this file and generates .bki
* the genbki.sh script reads this file and generates .bki
...
@@ -338,6 +338,16 @@ DATA(insert OID = 0 ( 403 652 820 3 btreesel btreenpage ));
...
@@ -338,6 +338,16 @@ DATA(insert OID = 0 ( 403 652 820 3 btreesel btreenpage ));
DATA
(
insert
OID
=
0
(
403
652
825
4
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
652
825
4
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
652
824
5
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
652
824
5
btreesel
btreenpage
));
/*
* nbtree numeric
*/
DATA
(
insert
OID
=
0
(
403
1768
1754
1
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
1768
1755
2
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
1768
1752
3
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
1768
1757
4
btreesel
btreenpage
));
DATA
(
insert
OID
=
0
(
403
1768
1756
5
btreesel
btreenpage
));
/*
/*
* hash table _ops
* hash table _ops
*/
*/
...
...
src/include/catalog/pg_amproc.h
View file @
b5c4b772
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_amproc.h,v 1.1
4 1999/03/26 07:32:41 tgl
Exp $
* $Id: pg_amproc.h,v 1.1
5 1999/09/29 21:13:30 wieck
Exp $
*
*
* NOTES
* NOTES
* the genbki.sh script reads this file and generates .bki
* the genbki.sh script reads this file and generates .bki
...
@@ -96,6 +96,7 @@ DATA(insert OID = 0 (403 1312 1314 1));
...
@@ -96,6 +96,7 @@ DATA(insert OID = 0 (403 1312 1314 1));
DATA
(
insert
OID
=
0
(
403
1313
1315
1
));
DATA
(
insert
OID
=
0
(
403
1313
1315
1
));
DATA
(
insert
OID
=
0
(
403
810
836
1
));
DATA
(
insert
OID
=
0
(
403
810
836
1
));
DATA
(
insert
OID
=
0
(
403
935
926
1
));
DATA
(
insert
OID
=
0
(
403
935
926
1
));
DATA
(
insert
OID
=
0
(
403
1768
1769
1
));
/* hash */
/* hash */
...
...
src/include/catalog/pg_opclass.h
View file @
b5c4b772
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_opclass.h,v 1.
19 1999/05/25 16:13:45 momjian
Exp $
* $Id: pg_opclass.h,v 1.
20 1999/09/29 21:13:30 wieck
Exp $
*
*
* NOTES
* NOTES
* the genbki.sh script reads this file and generates .bki
* the genbki.sh script reads this file and generates .bki
...
@@ -115,5 +115,7 @@ DATA(insert OID = 935 ( network_ops 869 ));
...
@@ -115,5 +115,7 @@ DATA(insert OID = 935 ( network_ops 869 ));
DESCR
(
""
);
DESCR
(
""
);
DATA
(
insert
OID
=
652
(
network_ops
650
));
DATA
(
insert
OID
=
652
(
network_ops
650
));
DESCR
(
""
);
DESCR
(
""
);
DATA
(
insert
OID
=
1768
(
numeric_ops
1700
));
DESCR
(
""
);
#endif
/* PG_OPCLASS_H */
#endif
/* PG_OPCLASS_H */
src/include/catalog/pg_proc.h
View file @
b5c4b772
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_proc.h,v 1.10
2 1999/09/26 02:28:38 tgl
Exp $
* $Id: pg_proc.h,v 1.10
3 1999/09/29 21:13:30 wieck
Exp $
*
*
* NOTES
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
* The script catalog/genbki.sh reads this file and generates .bki
...
@@ -2306,6 +2306,8 @@ DATA(insert OID = 1766 ( numeric_smaller PGUID 11 f t t 2 f 1700 "1700 1700" 10
...
@@ -2306,6 +2306,8 @@ DATA(insert OID = 1766 ( numeric_smaller PGUID 11 f t t 2 f 1700 "1700 1700" 10
DESCR
(
"smaller of two numbers"
);
DESCR
(
"smaller of two numbers"
);
DATA
(
insert
OID
=
1767
(
numeric_larger
PGUID
11
f
t
t
2
f
1700
"1700 1700"
100
0
0
100
numeric_larger
-
));
DATA
(
insert
OID
=
1767
(
numeric_larger
PGUID
11
f
t
t
2
f
1700
"1700 1700"
100
0
0
100
numeric_larger
-
));
DESCR
(
"larger of two numbers"
);
DESCR
(
"larger of two numbers"
);
DATA
(
insert
OID
=
1769
(
numeric_cmp
PGUID
11
f
t
t
2
f
23
"1700 1700"
100
0
0
100
numeric_cmp
-
));
DESCR
(
"compare two numbers"
);
/*
/*
...
...
src/include/utils/builtins.h
View file @
b5c4b772
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: builtins.h,v 1.8
5 1999/08/01 04:54:20 tgl
Exp $
* $Id: builtins.h,v 1.8
6 1999/09/29 21:13:31 wieck
Exp $
*
*
* NOTES
* NOTES
* This should normally only be included by fmgr.h.
* This should normally only be included by fmgr.h.
...
@@ -572,6 +572,7 @@ Numeric numeric_round(Numeric num, int32 scale);
...
@@ -572,6 +572,7 @@ Numeric numeric_round(Numeric num, int32 scale);
Numeric
numeric_trunc
(
Numeric
num
,
int32
scale
);
Numeric
numeric_trunc
(
Numeric
num
,
int32
scale
);
Numeric
numeric_ceil
(
Numeric
num
);
Numeric
numeric_ceil
(
Numeric
num
);
Numeric
numeric_floor
(
Numeric
num
);
Numeric
numeric_floor
(
Numeric
num
);
int32
numeric_cmp
(
Numeric
num1
,
Numeric
num2
);
bool
numeric_eq
(
Numeric
num1
,
Numeric
num2
);
bool
numeric_eq
(
Numeric
num1
,
Numeric
num2
);
bool
numeric_ne
(
Numeric
num1
,
Numeric
num2
);
bool
numeric_ne
(
Numeric
num1
,
Numeric
num2
);
bool
numeric_gt
(
Numeric
num1
,
Numeric
num2
);
bool
numeric_gt
(
Numeric
num1
,
Numeric
num2
);
...
...
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