Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49451ae

Browse files
committed
Add code so that when COPY_PARSE_PLAN_TREES is defined, the copy and
equal functions are checked for raw parse trees as well as post-analysistrees. This was never very important before, but the upcoming plan cachecontrol module will need to be able to do copyObject() on raw parse trees.
1 parent4fe1a12 commit49451ae

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.523 2007/02/15 23:23:23 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.524 2007/02/17 19:33:32 tgl Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -540,6 +540,19 @@ pg_parse_query(const char *query_string)
540540
if (log_parser_stats)
541541
ShowUsage("PARSER STATISTICS");
542542

543+
#ifdefCOPY_PARSE_PLAN_TREES
544+
/* Optional debugging check: pass raw parsetrees through copyObject() */
545+
{
546+
List*new_list= (List*)copyObject(raw_parsetree_list);
547+
548+
/* This checks both copyObject() and the equal() routines... */
549+
if (!equal(new_list,raw_parsetree_list))
550+
elog(WARNING,"copyObject() failed to produce an equal raw parse tree");
551+
else
552+
raw_parsetree_list=new_list;
553+
}
554+
#endif
555+
543556
returnraw_parsetree_list;
544557
}
545558

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp