diff options
| author | Tom Lane | 1999-05-13 07:29:22 +0000 |
|---|---|---|
| committer | Tom Lane | 1999-05-13 07:29:22 +0000 |
| commit | 507a0a2ab09144f524e3239b7fc201ad1ad1b78e (patch) | |
| tree | 77c434943724f627e3c901f06443f02ae57d467b /src/include/parser | |
| parent | f80642137cc0d2dbdaea68b8e439de0d50a5c01f (diff) | |
Rip out QueryTreeList structure, root and branch. Querytree
lists are now plain old garden-variety Lists, allocated with palloc,
rather than specialized expansible-array data allocated with malloc.
This substantially simplifies their handling and eliminates several
sources of memory leakage.
Several basic types of erroneous queries (syntax error, attempt to
insert a duplicate key into a unique index) now demonstrably leak
zero bytes per query.
Diffstat (limited to 'src/include/parser')
| -rw-r--r-- | src/include/parser/analyze.h | 4 | ||||
| -rw-r--r-- | src/include/parser/parse_node.h | 8 | ||||
| -rw-r--r-- | src/include/parser/parser.h | 4 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index 4be7637d744..af775c84f89 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.h,v 1.5 1999/01/18 00:10:11 momjian Exp $ + * $Id: analyze.h,v 1.6 1999/05/13 07:29:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ #include <parser/parse_node.h> -extern QueryTreeList *parse_analyze(List *pl, ParseState *parentParseState); +extern List *parse_analyze(List *pl, ParseState *parentParseState); /***S*I***/ extern void create_select_list(Node *ptr, List **select_list, bool *unionall_present); extern Node *A_Expr_to_Expr(Node *ptr, bool *intersect_present); diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index 23040b57239..9bc4cf2b13b 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_node.h,v 1.11 1998/09/01 04:37:35 momjian Exp $ + * $Id: parse_node.h,v 1.12 1999/05/13 07:29:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,12 +19,6 @@ #include <parser/parse_type.h> #include <utils/rel.h> -typedef struct QueryTreeList -{ - int len; /* number of queries */ - Query **qtrees; -} QueryTreeList; - /* state information used during parse analysis */ typedef struct ParseState { diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h index 8d13e028809..50b99b48ce6 100644 --- a/src/include/parser/parser.h +++ b/src/include/parser/parser.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parser.h,v 1.4 1998/09/01 04:37:42 momjian Exp $ + * $Id: parser.h,v 1.5 1999/05/13 07:29:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,6 +15,6 @@ #include <parser/parse_node.h> -extern QueryTreeList *parser(char *str, Oid *typev, int nargs); +extern List *parser(char *str, Oid *typev, int nargs); #endif /* PARSER_H */ |
