mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Matching clauses to functional indices was broken, now fixed.
This commit is contained in:
		@@ -8,7 +8,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * IDENTIFICATION
 | 
					 * IDENTIFICATION
 | 
				
			||||||
 *	  $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.18 1998/07/27 19:37:58 vadim Exp $
 | 
					 *	  $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.19 1998/07/31 15:10:40 vadim Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -405,10 +405,10 @@ group_clauses_by_indexkey(RelOptInfo *rel,
 | 
				
			|||||||
	int			curIndxKey;
 | 
						int			curIndxKey;
 | 
				
			||||||
	Oid			curClass;
 | 
						Oid			curClass;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (clauseinfo_list == NIL)
 | 
						if (clauseinfo_list == NIL || indexkeys[0] == 0)
 | 
				
			||||||
		return NIL;
 | 
							return NIL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	while (!DoneMatchingIndexKeys(indexkeys, index))
 | 
						do
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		List	   *tempgroup = NIL;
 | 
							List	   *tempgroup = NIL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -438,7 +438,7 @@ group_clauses_by_indexkey(RelOptInfo *rel,
 | 
				
			|||||||
		indexkeys++;
 | 
							indexkeys++;
 | 
				
			||||||
		classes++;
 | 
							classes++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						} while (!DoneMatchingIndexKeys(indexkeys, index));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* clausegroup holds all matched clauses ordered by indexkeys */
 | 
						/* clausegroup holds all matched clauses ordered by indexkeys */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -469,10 +469,10 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
 | 
				
			|||||||
	Oid			curClass;
 | 
						Oid			curClass;
 | 
				
			||||||
	bool		jfound = false;
 | 
						bool		jfound = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (join_cinfo_list == NIL)
 | 
						if (join_cinfo_list == NIL || indexkeys[0] == 0)
 | 
				
			||||||
		return NIL;
 | 
							return NIL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	while (!DoneMatchingIndexKeys(indexkeys, index))
 | 
						do
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		List	   *tempgroup = NIL;
 | 
							List	   *tempgroup = NIL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -518,7 +518,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
 | 
				
			|||||||
		indexkeys++;
 | 
							indexkeys++;
 | 
				
			||||||
		classes++;
 | 
							classes++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						} while (!DoneMatchingIndexKeys(indexkeys, index));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* clausegroup holds all matched clauses ordered by indexkeys */
 | 
						/* clausegroup holds all matched clauses ordered by indexkeys */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user