From 507a0a2ab09144f524e3239b7fc201ad1ad1b78e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 13 May 1999 07:29:22 +0000 Subject: 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. --- doc/src/sgml/arch-dev.sgml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/arch-dev.sgml b/doc/src/sgml/arch-dev.sgml index 7bc8e8482e1..b8d03725bea 100644 --- a/doc/src/sgml/arch-dev.sgml +++ b/doc/src/sgml/arch-dev.sgml @@ -3758,7 +3758,7 @@ $\ldots$/src/backend/tcop/postgres.c}. List * pg_parse_and_plan(char *query_string, Oid *typev, int nargs, - QueryTreeList **queryListP, + List **queryListP, CommandDest dest) { . @@ -4032,7 +4032,7 @@ instead. if(IsA(tree, SelectStmt)) { - QueryTreeList *qtree; + List *qtrees; /* If we get to the tree given in first_select * return parsetree instead of performing @@ -4044,9 +4044,8 @@ instead. else { /* transform the unprocessed Query nodes */ - qtree = - parse_analyze(lcons(tree, NIL), NULL); - result = (Node *)qtree->qtrees[0]; + qtrees = parse_analyze(lcons(tree, NIL), NULL); + result = (Node *) lfirst(qtrees); } } if(IsA(tree,Expr)) -- cgit v1.2.3