PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
cash.h
Go to the documentation of this file.
1
/*
2
* src/include/utils/cash.h
3
*
4
*
5
* cash.h
6
* Written by D'Arcy J.M. Cain
7
*
8
* Functions to allow input and output of money normally but store
9
* and handle it as 64 bit integer.
10
*/
11
12
#ifndef CASH_H
13
#define CASH_H
14
15
#include "
fmgr.h
"
16
17
typedef
int64
Cash
;
18
19
/* Cash is pass-by-reference if and only if int64 is */
20
static
inline
Cash
21
DatumGetCash
(
Datum
X)
22
{
23
return
DatumGetInt64
(X);
24
}
25
26
static
inline
Datum
27
CashGetDatum
(
Cash
X)
28
{
29
return
Int64GetDatum
(X);
30
}
31
32
#define PG_GETARG_CASH(n) DatumGetCash(PG_GETARG_DATUM(n))
33
#define PG_RETURN_CASH(x) return CashGetDatum(x)
34
35
#endif
/* CASH_H */
int64
int64_t int64
Definition:
c.h:499
DatumGetCash
static Cash DatumGetCash(Datum X)
Definition:
cash.h:21
CashGetDatum
static Datum CashGetDatum(Cash X)
Definition:
cash.h:27
Cash
int64 Cash
Definition:
cash.h:17
Int64GetDatum
Datum Int64GetDatum(int64 X)
Definition:
fmgr.c:1807
fmgr.h
DatumGetInt64
static int64 DatumGetInt64(Datum X)
Definition:
postgres.h:390
Datum
uintptr_t Datum
Definition:
postgres.h:69
src
include
utils
cash.h
Generated on Mon Apr 28 2025 18:13:29 for PostgreSQL Source Code by
1.9.4