|
6 | 6 | * Copyright (c) 2002, PostgreSQL Global Development Group
|
7 | 7 | *
|
8 | 8 | * IDENTIFICATION
|
9 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.2 2002/09/04 20:31:15 momjian Exp $ |
| 9 | + * $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.3 2002/09/14 19:59:20 tgl Exp $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -248,7 +248,7 @@ StoreQuery(const char *stmt_name, List *query_list, List *plan_list,
|
248 | 248 | elog(ERROR,"Prepared statement with name \"%s\" already exists",
|
249 | 249 | stmt_name);
|
250 | 250 |
|
251 |
| -/*Okay.Make a permanent memory context for the hashtable entry */ |
| 251 | +/* Make a permanent memory context for the hashtable entry */ |
252 | 252 | entrycxt=AllocSetContextCreate(TopMemoryContext,
|
253 | 253 | stmt_name,
|
254 | 254 | 1024,
|
@@ -399,8 +399,8 @@ DeallocateQuery(DeallocateStmt *stmt)
|
399 | 399 | stmt->name);
|
400 | 400 |
|
401 | 401 | /* Flush the context holding the subsidiary data */
|
402 |
| -if(MemoryContextIsValid(entry->context)) |
403 |
| -MemoryContextDelete(entry->context); |
| 402 | +Assert(MemoryContextIsValid(entry->context)); |
| 403 | +MemoryContextDelete(entry->context); |
404 | 404 |
|
405 | 405 | /* Now we can remove the hash table entry */
|
406 | 406 | hash_search(prepared_queries,key,HASH_REMOVE,NULL);
|
|