|
1 | 1 | /*------------------------------------------------------------------------- |
2 | 2 | * |
3 | 3 | * pg_list.h |
4 | | - *POSTGRESgeneric list package |
| 4 | + *interface for PostgreSQLgeneric linked list package |
5 | 5 | * |
6 | 6 | * |
7 | 7 | * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group |
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California |
9 | 9 | * |
10 | | - * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.42 2003/11/29 22:41:06 pgsql Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.43 2004/01/07 18:43:36 neilc Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
|
21 | 21 | * ---------------------------------------------------------------- |
22 | 22 | */ |
23 | 23 |
|
24 | | -/*---------------------- |
25 | | - *Value node |
26 | | - * |
27 | | - * The same Value struct is used for five node types: T_Integer, |
28 | | - * T_Float, T_String, T_BitString, T_Null. |
29 | | - * |
30 | | - * Integral values are actually represented by a machine integer, |
31 | | - * but both floats and strings are represented as strings. |
32 | | - * Using T_Float as the node type simply indicates that |
33 | | - * the contents of the string look like a valid numeric literal. |
34 | | - * |
35 | | - * (Before Postgres 7.0, we used a double to represent T_Float, |
36 | | - * but that creates loss-of-precision problems when the value is |
37 | | - * ultimately destined to be converted to NUMERIC.Since Value nodes |
38 | | - * are only used in the parsing process, not for runtime data, it's |
39 | | - * better to use the more general representation.) |
40 | | - * |
41 | | - * Note that an integer-looking string will get lexed as T_Float if |
42 | | - * the value is too large to fit in a 'long'. |
43 | | - * |
44 | | - * Nulls, of course, don't need the value part at all. |
45 | | - *---------------------- |
46 | | - */ |
47 | | -typedefstructValue |
48 | | -{ |
49 | | -NodeTagtype;/* tag appropriately (eg. T_String) */ |
50 | | -unionValUnion |
51 | | -{ |
52 | | -longival;/* machine integer */ |
53 | | -char*str;/* string */ |
54 | | -}val; |
55 | | -}Value; |
56 | | - |
57 | | -#defineintVal(v)(((Value *)(v))->val.ival) |
58 | | -#definefloatVal(v)atof(((Value *)(v))->val.str) |
59 | | -#definestrVal(v)(((Value *)(v))->val.str) |
60 | | - |
61 | | - |
62 | 24 | /*---------------------- |
63 | 25 | *List node |
64 | 26 | * |
@@ -150,15 +112,6 @@ typedef struct FastList |
150 | 112 | #definemakeFastList1(fl,x1) \ |
151 | 113 | ( (fl)->head = (fl)->tail = makeList1(x1) ) |
152 | 114 |
|
153 | | - |
154 | | -/* |
155 | | - * function prototypes in nodes/list.c |
156 | | - */ |
157 | | -externValue*makeInteger(longi); |
158 | | -externValue*makeFloat(char*numericStr); |
159 | | -externValue*makeString(char*str); |
160 | | -externValue*makeBitString(char*str); |
161 | | - |
162 | 115 | externList*lcons(void*datum,List*list); |
163 | 116 | externList*lconsi(intdatum,List*list); |
164 | 117 | externList*lconso(Oiddatum,List*list); |
|