mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.13 2002/12/12 15:49:32 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.14 2003/02/08 20:20:54 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -25,7 +25,7 @@
|
||||
#include "parser/parse_coerce.h"
|
||||
#include "utils/lsyscache.h"
|
||||
|
||||
static List *TidqualFromRestrictinfo(List *relids, List *restrictinfo);
|
||||
static List *TidqualFromRestrictinfo(Relids relids, List *restrictinfo);
|
||||
static bool isEvaluable(int varno, Node *node);
|
||||
static Node *TidequalClause(int varno, OpExpr *node);
|
||||
static List *TidqualFromExpr(int varno, Expr *expr);
|
||||
@ -198,7 +198,7 @@ TidqualFromExpr(int varno, Expr *expr)
|
||||
}
|
||||
|
||||
static List *
|
||||
TidqualFromRestrictinfo(List *relids, List *restrictinfo)
|
||||
TidqualFromRestrictinfo(Relids relids, List *restrictinfo)
|
||||
{
|
||||
List *lst,
|
||||
*rlst = NIL;
|
||||
@ -206,9 +206,9 @@ TidqualFromRestrictinfo(List *relids, List *restrictinfo)
|
||||
Node *node;
|
||||
Expr *expr;
|
||||
|
||||
if (length(relids) != 1)
|
||||
if (bms_membership(relids) != BMS_SINGLETON)
|
||||
return NIL;
|
||||
varno = lfirsti(relids);
|
||||
varno = bms_singleton_member(relids);
|
||||
foreach(lst, restrictinfo)
|
||||
{
|
||||
node = lfirst(lst);
|
||||
|
Reference in New Issue
Block a user