1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
1999-05-13 07:29:22 +00:00
parent f80642137c
commit 507a0a2ab0
18 changed files with 192 additions and 288 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.51 1999/05/12 15:01:37 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.52 1999/05/13 07:28:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -671,7 +671,7 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
* XXX Why is this function in this module?
*/
void
pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
pg_checkretval(Oid rettype, List *queryTreeList)
{
Query *parse;
List *tlist;
@ -686,7 +686,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
int i;
/* find the final query */
parse = queryTreeList->qtrees[queryTreeList->len - 1];
parse = (Query *) nth(length(queryTreeList)-1, queryTreeList);
/*
* test 1: if the last query is a utility invocation, then there had