From 51db6455eac8aa5b0078cefffed51a6257ccbe1d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 9 Sep 1999 02:36:04 +0000 Subject: 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. --- src/backend/optimizer/util/plancat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/optimizer/util/plancat.c') diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index a428e027f6..9ca188bce6 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 -- cgit v1.2.1