mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-07 17:59:22 +02:00
identified by Hiroshi (incorrect cost attributed to OR clauses after multiple passes through set_rest_selec()). I think the code was trying to allow selectivities of OR subclauses to be passed in from outside, but noplace was actually passing any useful data, and set_rest_selec() was passing wrong data. Restructure representation of "indexqual" in IndexPath nodes so that it is the same as for indxqual in completed IndexScan nodes: namely, a toplevel list with an entry for each pass of the index scan, having sublists that are implicitly-ANDed index qual conditions for that pass. You don't want to know what the old representation was :-( Improve documentation of OR-clause indexscan functions. Remove useless 'notclause' field from RestrictInfo nodes. (This might force an initdb for anyone who has stored rules containing RestrictInfos, but I do not think that RestrictInfo ever appears in completed plans.)
27 lines
839 B
C
27 lines
839 B
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* restrictinfo.h
|
|
* prototypes for restrictinfo.c.
|
|
*
|
|
*
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: restrictinfo.h,v 1.6 1999/07/24 23:21:05 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef RESTRICTINFO_H
|
|
#define RESTRICTINFO_H
|
|
|
|
#include "nodes/relation.h"
|
|
|
|
extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
|
|
extern List *get_actual_clauses(List *restrictinfo_list);
|
|
extern void get_relattvals(List *restrictinfo_list, List **attnos,
|
|
List **values, List **flags);
|
|
extern void get_joinvars(Oid relid, List *restrictinfo_list,
|
|
List **attnos, List **values, List **flags);
|
|
extern List *get_opnos(List *restrictinfo_list);
|
|
|
|
#endif /* RESTRICTINFO_H */
|