mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Set pg_am.amstrategies to zero for index AMs that don't have fixed
operator strategy numbers, ie, GiST and GIN. This is almost cosmetic enough to not need a catversion bump, but since the opr_sanity regression test has to change in sync with the catalog entry, I figured I'd better do one.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/util/plancat.c,v 1.127 2006/10/04 00:29:55 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/util/plancat.c,v 1.128 2006/12/18 18:56:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -190,10 +190,17 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent,
|
||||
* Fetch the ordering operators associated with the index, if any.
|
||||
*/
|
||||
amorderstrategy = indexRelation->rd_am->amorderstrategy;
|
||||
if (amorderstrategy != 0)
|
||||
if (amorderstrategy > 0)
|
||||
{
|
||||
int oprindex = amorderstrategy - 1;
|
||||
|
||||
/*
|
||||
* Index AM must have a fixed set of strategies for it to
|
||||
* make sense to specify amorderstrategy, so we need not
|
||||
* allow the case amstrategies == 0.
|
||||
*/
|
||||
Assert(oprindex < indexRelation->rd_am->amstrategies);
|
||||
|
||||
for (i = 0; i < ncolumns; i++)
|
||||
{
|
||||
info->ordering[i] = indexRelation->rd_operator[oprindex];
|
||||
|
Reference in New Issue
Block a user