mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable. Restrictions on expressions are the same as for predicates (only immutable functions, no sub-selects). This fixes problems recently introduced with inlining SQL functions, because the inlining transformation is applied to both expression trees so the planner can still match them up. Along the way, improve efficiency of handling index predicates (both predicates and index expressions are now cached by the relcache) and fix 7.3 oversight that didn't record dependencies of predicate expressions.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.158 2003/05/27 17:49:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.159 2003/05/28 16:03:55 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1169,6 +1169,10 @@ index_register(Oid heap,
|
||||
newind->il_info = (IndexInfo *) palloc(sizeof(IndexInfo));
|
||||
|
||||
memcpy(newind->il_info, indexInfo, sizeof(IndexInfo));
|
||||
/* expressions will likely be null, but may as well copy it */
|
||||
newind->il_info->ii_Expressions = (List *)
|
||||
copyObject(indexInfo->ii_Expressions);
|
||||
newind->il_info->ii_ExpressionsState = NIL;
|
||||
/* predicate will likely be null, but may as well copy it */
|
||||
newind->il_info->ii_Predicate = (List *)
|
||||
copyObject(indexInfo->ii_Predicate);
|
||||
|
Reference in New Issue
Block a user