diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-08 20:20:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-08 20:20:55 +0000 |
commit | c15a4c2aef3ca78a530778b735d43aa04d103ea6 (patch) | |
tree | 3106de03d9476a891c6e85cbf5dd477c8661f087 /src/backend/commands/explain.c | |
parent | 893678eda7de9db57beccfd2755836c1bea39112 (diff) | |
download | postgresql-c15a4c2aef3ca78a530778b735d43aa04d103ea6.tar.gz postgresql-c15a4c2aef3ca78a530778b735d43aa04d103ea6.zip |
Replace planner's representation of relation sets, per pghackers discussion.
Instead of Lists of integers, we now store variable-length bitmap sets.
This should be faster as well as less error-prone.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r-- | src/backend/commands/explain.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 6c8b02a156e..631c2817cc0 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994-5, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.100 2003/02/02 23:46:38 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.101 2003/02/08 20:20:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -775,12 +775,15 @@ show_scan_qual(List *qual, bool is_or_qual, const char *qlabel, */ if (outer_plan) { - if (intMember(OUTER, pull_varnos(node))) + Relids varnos = pull_varnos(node); + + if (bms_is_member(OUTER, varnos)) outercontext = deparse_context_for_subplan("outer", outer_plan->targetlist, es->rtable); else outercontext = NULL; + bms_free(varnos); } else outercontext = NULL; @@ -857,6 +860,7 @@ show_sort_keys(List *tlist, int nkeys, const char *qlabel, int keyno; List *tl; char *exprstr; + Relids varnos; int i; if (nkeys <= 0) @@ -874,7 +878,8 @@ show_sort_keys(List *tlist, int nkeys, const char *qlabel, * there are Vars with zero varno, use the tlist itself to determine * their names. */ - if (intMember(0, pull_varnos((Node *) tlist))) + varnos = pull_varnos((Node *) tlist); + if (bms_is_member(0, varnos)) { Node *outercontext; @@ -893,6 +898,7 @@ show_sort_keys(List *tlist, int nkeys, const char *qlabel, es->rtable); useprefix = length(es->rtable) > 1; } + bms_free(varnos); for (keyno = 1; keyno <= nkeys; keyno++) { |