diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-29 21:39:12 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-29 21:39:12 +0000 |
| commit | f68f11928d5c791873073c882775dae10283ff49 (patch) | |
| tree | 628e4491fe33cdafb0e205d73e29b154ef68f94b /src/backend/commands/analyze.c | |
| parent | 851a4c48fd468b15ef988d5d2c79a44246dd478d (diff) | |
| download | postgresql-f68f11928d5c791873073c882775dae10283ff49.tar.gz | |
Tighten selection of equality and ordering operators for grouping
operations: make sure we use operators that are compatible, as determined
by a mergejoin link in pg_operator. Also, add code to planner to ensure
we don't try to use hashed grouping when the grouping operators aren't
marked hashable.
Diffstat (limited to 'src/backend/commands/analyze.c')
| -rw-r--r-- | src/backend/commands/analyze.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index e15320225d..2af7a3cd7c 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.50 2002/11/13 00:39:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.51 2002/11/29 21:39:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -402,10 +402,7 @@ examine_attribute(Relation onerel, int attnum) return NULL; /* If column has no "=" operator, we can't do much of anything */ - func_operator = compatible_oper(makeList1(makeString("=")), - attr->atttypid, - attr->atttypid, - true); + func_operator = equality_oper(attr->atttypid, true); if (func_operator != NULL) { oprrest = ((Form_pg_operator) GETSTRUCT(func_operator))->oprrest; @@ -443,10 +440,7 @@ examine_attribute(Relation onerel, int attnum) stats->attr->attstattarget = default_statistics_target; /* Is there a "<" operator with suitable semantics? */ - func_operator = compatible_oper(makeList1(makeString("<")), - attr->atttypid, - attr->atttypid, - true); + func_operator = ordering_oper(attr->atttypid, true); if (func_operator != NULL) { oprrest = ((Form_pg_operator) GETSTRUCT(func_operator))->oprrest; |
