PostgreSQL Source Code
git master
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
value.c
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* value.c
4
* implementation of Value nodes
5
*
6
*
7
* Copyright (c) 2003-2016, PostgreSQL Global Development Group
8
*
9
*
10
* IDENTIFICATION
11
* src/backend/nodes/value.c
12
*
13
*-------------------------------------------------------------------------
14
*/
15
#include "
postgres.h
"
16
17
#include "
nodes/parsenodes.h
"
18
19
/*
20
* makeInteger
21
*/
22
Value
*
23
makeInteger
(
long
i
)
24
{
25
Value
*v =
makeNode
(
Value
);
26
27
v->
type
=
T_Integer
;
28
v->
val
.
ival
=
i
;
29
return
v;
30
}
31
32
/*
33
* makeFloat
34
*
35
* Caller is responsible for passing a palloc'd string.
36
*/
37
Value
*
38
makeFloat
(
char
*numericStr)
39
{
40
Value
*v =
makeNode
(
Value
);
41
42
v->
type
=
T_Float
;
43
v->
val
.
str
= numericStr;
44
return
v;
45
}
46
47
/*
48
* makeString
49
*
50
* Caller is responsible for passing a palloc'd string.
51
*/
52
Value
*
53
makeString
(
char
*str)
54
{
55
Value
*v =
makeNode
(
Value
);
56
57
v->
type
=
T_String
;
58
v->
val
.
str
= str;
59
return
v;
60
}
61
62
/*
63
* makeBitString
64
*
65
* Caller is responsible for passing a palloc'd string.
66
*/
67
Value
*
68
makeBitString
(
char
*str)
69
{
70
Value
*v =
makeNode
(
Value
);
71
72
v->
type
=
T_BitString
;
73
v->
val
.
str
= str;
74
return
v;
75
}
makeString
Value * makeString(char *str)
Definition:
value.c:53
T_Integer
Definition:
nodes.h:282
Value::ValUnion::ival
long ival
Definition:
value.h:47
T_BitString
Definition:
nodes.h:285
makeInteger
Value * makeInteger(long i)
Definition:
value.c:23
parsenodes.h
Value::val
union Value::ValUnion val
makeBitString
Value * makeBitString(char *str)
Definition:
value.c:68
T_String
Definition:
nodes.h:284
postgres.h
makeFloat
Value * makeFloat(char *numericStr)
Definition:
value.c:38
makeNode
#define makeNode(_type_)
Definition:
nodes.h:539
Value
Definition:
value.h:42
T_Float
Definition:
nodes.h:283
Value::ValUnion::str
char * str
Definition:
value.h:48
i
int i
Definition:
preproc-comment.c:23
Value::type
NodeTag type
Definition:
value.h:44
src
backend
nodes
value.c
Generated on Sat Jun 4 2016 10:15:00 for PostgreSQL Source Code by
1.8.8