veil_datatypes.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "postgres.h"
00015 #include "veil_datatypes.h"
00016 #include "veil_funcs.h"
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 Range *
00028 vl_NewRange(bool shared)
00029 {
00030 Range *range;
00031
00032 if (shared) {
00033 range = vl_shmalloc(sizeof(Range));
00034 }
00035 else {
00036 range = vl_malloc(sizeof(Range));
00037 }
00038
00039 range->type = OBJ_RANGE;
00040 return range;
00041 }
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 Int4Var *
00052 vl_NewInt4(bool shared)
00053 {
00054 Int4Var *i4v;
00055
00056 if (shared) {
00057 i4v = vl_shmalloc(sizeof(Int4Var));
00058 }
00059 else {
00060 i4v = vl_malloc(sizeof(Int4Var));
00061 }
00062 i4v->type = OBJ_INT4;
00063 i4v->isnull = true;
00064 return i4v;
00065 }
00066