PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
value.c File Reference
#include "postgres.h"
#include "nodes/parsenodes.h"
Include dependency graph for value.c:

Go to the source code of this file.

Functions

ValuemakeInteger (long i)
 
ValuemakeFloat (char *numericStr)
 
ValuemakeString (char *str)
 
ValuemakeBitString (char *str)
 

Function Documentation

Value* makeBitString ( char *  str)

Definition at line 68 of file value.c.

References makeNode, Value::ValUnion::str, T_BitString, Value::type, and Value::val.

Referenced by nodeRead().

69 {
70  Value *v = makeNode(Value);
71 
72  v->type = T_BitString;
73  v->val.str = str;
74  return v;
75 }
union Value::ValUnion val
#define makeNode(_type_)
Definition: nodes.h:558
Definition: value.h:42
char * str
Definition: value.h:48
NodeTag type
Definition: value.h:44
Value* makeFloat ( char *  numericStr)

Definition at line 38 of file value.c.

References makeNode, Value::ValUnion::str, T_Float, Value::type, and Value::val.

Referenced by nodeRead(), and pg_get_object_address().

39 {
40  Value *v = makeNode(Value);
41 
42  v->type = T_Float;
43  v->val.str = numericStr;
44  return v;
45 }
union Value::ValUnion val
#define makeNode(_type_)
Definition: nodes.h:558
Definition: value.h:42
Definition: nodes.h:283
char * str
Definition: value.h:48
NodeTag type
Definition: value.h:44
Value* makeInteger ( long  i)

Definition at line 23 of file value.c.

References i, Value::ValUnion::ival, makeNode, T_Integer, Value::type, and Value::val.

Referenced by nodeRead(), postgresGetForeignPlan(), postgresPlanDirectModify(), postgresPlanForeignModify(), sequence_options(), and transformCreateStmt().

24 {
25  Value *v = makeNode(Value);
26 
27  v->type = T_Integer;
28  v->val.ival = i;
29  return v;
30 }
long ival
Definition: value.h:47
union Value::ValUnion val
#define makeNode(_type_)
Definition: nodes.h:558
Definition: value.h:42
int i
NodeTag type
Definition: value.h:44
Value* makeString ( char *  str)

Definition at line 53 of file value.c.

References makeNode, Value::ValUnion::str, T_String, Value::type, and Value::val.

Referenced by addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), analyzeCTETargetList(), buildRelationAliases(), check_selective_binary_conversion(), CreateRole(), DefineView(), deserialize_deflist(), expandRTE(), expandTupleDesc(), FunctionIsVisible(), generate_function_name(), generate_operator_name(), generateClonedIndexStmt(), generateSerialExtraStmts(), get_collation(), get_file_fdw_attribute_options(), get_object_address_rv(), get_opclass(), make_copy_attnamelist(), makeSimpleA_Expr(), makeTypeName(), nodeRead(), OperatorIsVisible(), pg_logical_slot_get_changes_guts(), plpgsql_parse_dblword(), plpgsql_parse_tripword(), postgresGetForeignPlan(), postgresPlanDirectModify(), postgresPlanForeignModify(), RebuildConstraintComment(), regoperout(), regprocout(), resolve_unique_index_expr(), stringToQualifiedNameList(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), textarray_to_stringlist(), textarray_to_strvaluelist(), textToQualifiedNameList(), transformColumnDefinition(), transformColumnRef(), transformCurrentOfExpr(), transformFkeyGetPrimaryKey(), transformFromClauseItem(), transformIndexConstraint(), transformRangeTableFunc(), transformRowExpr(), transformSetOperationStmt(), transformSubLink(), transformTableLikeClause(), transformXmlExpr(), and untransformRelOptions().

54 {
55  Value *v = makeNode(Value);
56 
57  v->type = T_String;
58  v->val.str = str;
59  return v;
60 }
union Value::ValUnion val
#define makeNode(_type_)
Definition: nodes.h:558
Definition: value.h:42
char * str
Definition: value.h:48
NodeTag type
Definition: value.h:44