mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of lists of PathKeyItem nodes, not just lists of lists of vars). This was a big win --- the code is smaller and IMHO more understandable than it was, even though it handles more cases. I believe the node changes will not force an initdb for anyone; planner nodes don't show up in stored rules.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.26 1999/08/14 19:29:35 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.27 1999/08/16 02:17:42 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* XXX a few of the following functions are duplicated to handle
|
||||
@@ -447,6 +447,31 @@ intLispRemove(int elem, List *list)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ltruncate
|
||||
* Truncate a list to n elements.
|
||||
* Does nothing if n >= length(list).
|
||||
* NB: the list is modified in-place!
|
||||
*/
|
||||
List *
|
||||
ltruncate(int n, List *list)
|
||||
{
|
||||
List *ptr;
|
||||
|
||||
if (n <= 0)
|
||||
return NIL; /* truncate to zero length */
|
||||
|
||||
foreach(ptr, list)
|
||||
{
|
||||
if (--n == 0)
|
||||
{
|
||||
lnext(ptr) = NIL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/*
|
||||
* set_difference
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user