diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/nodes/Makefile | 4 | ||||
-rw-r--r-- | src/backend/nodes/list.c | 75 | ||||
-rw-r--r-- | src/backend/nodes/value.c | 75 |
3 files changed, 79 insertions, 75 deletions
diff --git a/src/backend/nodes/Makefile b/src/backend/nodes/Makefile index a2a994d8685..a4c19201bb2 100644 --- a/src/backend/nodes/Makefile +++ b/src/backend/nodes/Makefile @@ -4,7 +4,7 @@ # Makefile for backend/nodes # # IDENTIFICATION -# $PostgreSQL: pgsql/src/backend/nodes/Makefile,v 1.15 2003/11/29 19:51:49 pgsql Exp $ +# $PostgreSQL: pgsql/src/backend/nodes/Makefile,v 1.16 2004/01/07 18:43:36 neilc Exp $ # #------------------------------------------------------------------------- @@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global OBJS = nodeFuncs.o nodes.o list.o bitmapset.o \ copyfuncs.o equalfuncs.o makefuncs.o \ - outfuncs.o readfuncs.o print.o read.o + outfuncs.o readfuncs.o print.o read.o value.o all: SUBSYS.o diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c index eba26bb4808..aeda02d1702 100644 --- a/src/backend/nodes/list.c +++ b/src/backend/nodes/list.c @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------- * * list.c - * POSTGRES generic list package + * implementation for PostgreSQL generic linked list package * * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group @@ -9,17 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/list.c,v 1.55 2003/11/29 19:51:49 pgsql Exp $ - * - * NOTES - * XXX a few of the following functions are duplicated to handle - * List of pointers and List of integers separately. Some day, - * someone should unify them. - ay 11/2/94 - * This file needs cleanup. - * - * HISTORY - * AUTHOR DATE MAJOR EVENT - * Andrew Yu Oct, 1994 file creation + * $PostgreSQL: pgsql/src/backend/nodes/list.c,v 1.56 2004/01/07 18:43:36 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -27,67 +17,6 @@ #include "nodes/parsenodes.h" - -/* - * makeInteger - */ -Value * -makeInteger(long i) -{ - Value *v = makeNode(Value); - - v->type = T_Integer; - v->val.ival = i; - return v; -} - -/* - * makeFloat - * - * Caller is responsible for passing a palloc'd string. - */ -Value * -makeFloat(char *numericStr) -{ - Value *v = makeNode(Value); - - v->type = T_Float; - v->val.str = numericStr; - return v; -} - -/* - * makeString - * - * Caller is responsible for passing a palloc'd string. - */ -Value * -makeString(char *str) -{ - Value *v = makeNode(Value); - - v->type = T_String; - v->val.str = str; - return v; -} - - -/* - * makeBitString - * - * Caller is responsible for passing a palloc'd string. - */ -Value * -makeBitString(char *str) -{ - Value *v = makeNode(Value); - - v->type = T_BitString; - v->val.str = str; - return v; -} - - /* * lcons * diff --git a/src/backend/nodes/value.c b/src/backend/nodes/value.c new file mode 100644 index 00000000000..5ea965c8b2f --- /dev/null +++ b/src/backend/nodes/value.c @@ -0,0 +1,75 @@ +/*------------------------------------------------------------------------- + * + * value.c + * implementation of Value nodes + * + * + * Copyright (c) 2003, PostgreSQL Global Development Group + * + * + * IDENTIFICATION + * $PostgreSQL: pgsql/src/backend/nodes/value.c,v 1.1 2004/01/07 18:43:36 neilc Exp $ + * + *------------------------------------------------------------------------- + */ +#include "postgres.h" + +#include "nodes/parsenodes.h" + +/* + * makeInteger + */ +Value * +makeInteger(long i) +{ + Value *v = makeNode(Value); + + v->type = T_Integer; + v->val.ival = i; + return v; +} + +/* + * makeFloat + * + * Caller is responsible for passing a palloc'd string. + */ +Value * +makeFloat(char *numericStr) +{ + Value *v = makeNode(Value); + + v->type = T_Float; + v->val.str = numericStr; + return v; +} + +/* + * makeString + * + * Caller is responsible for passing a palloc'd string. + */ +Value * +makeString(char *str) +{ + Value *v = makeNode(Value); + + v->type = T_String; + v->val.str = str; + return v; +} + +/* + * makeBitString + * + * Caller is responsible for passing a palloc'd string. + */ +Value * +makeBitString(char *str) +{ + Value *v = makeNode(Value); + + v->type = T_BitString; + v->val.str = str; + return v; +} |