summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/plancat.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-09-09 02:36:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-09-09 02:36:04 +0000
commit51db6455eac8aa5b0078cefffed51a6257ccbe1d (patch)
treeb32ee35da610ebae0397bec58e0ad57143a21517 /src/backend/optimizer/util/plancat.c
parent45500964f61b0ec671b84b1fdb988bad78f35473 (diff)
Repair error noticed by Roberto Cornacchia: selectivity code
was rejecting negative attnums as bogus, which of course they are not. Add code to get_attdisbursion to produce a useful value for OID attribute, since VACUUM does not store stats for system attributes. Also, repair bug that's been in eqjoinsel for a long time: it was taking the max of the two columns' disbursions, whereas it should use the min.
Diffstat (limited to 'src/backend/optimizer/util/plancat.c')
-rw-r--r--src/backend/optimizer/util/plancat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index a428e027f61..9ca188bce62 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.36 1999/07/25 23:07:26 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.37 1999/09/09 02:35:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -288,7 +288,7 @@ index_selectivity(Query *root,
}
/*
- * restriction_selectivity in lisp system.
+ * restriction_selectivity
*
* NOTE: The routine is now merged with RestrictionClauseSelectivity
* as defined in plancat.c
@@ -298,7 +298,7 @@ index_selectivity(Query *root,
* operator relation, by calling the function manager.
*
* XXX The assumption in the selectivity procedures is that if the
- * relation OIDs or attribute numbers are -1, then the clause
+ * relation OIDs or attribute numbers are 0, then the clause
* isn't of the form (op var const).
*/
Cost
@@ -337,7 +337,7 @@ restriction_selectivity(Oid functionObjectId,
* information.
*
* XXX The assumption in the selectivity procedures is that if the
- * relation OIDs or attribute numbers are -1, then the clause
+ * relation OIDs or attribute numbers are 0, then the clause
* isn't of the form (op var var).
*/
Cost