1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

More optimizer speedups.

This commit is contained in:
Bruce Momjian
1999-02-11 14:59:09 +00:00
parent 129543e22d
commit d244df95db
17 changed files with 192 additions and 131 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.66 1999/02/10 03:52:34 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.67 1999/02/11 14:58:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1093,26 +1093,26 @@ CopyPathFields(Path *from, Path *newnode)
newnode->path_cost = from->path_cost;
newnode->path_order = makeNode(PathOrder);
newnode->path_order->ordtype = from->path_order->ordtype;
if (from->path_order->ordtype == SORTOP_ORDER)
newnode->pathorder = makeNode(PathOrder);
newnode->pathorder->ordtype = from->pathorder->ordtype;
if (from->pathorder->ordtype == SORTOP_ORDER)
{
int len,
i;
Oid *ordering = from->path_order->ord.sortop;
Oid *ordering = from->pathorder->ord.sortop;
if (ordering)
{
for (len = 0; ordering[len] != 0; len++)
;
newnode->path_order->ord.sortop = (Oid *) palloc(sizeof(Oid) * (len + 1));
newnode->pathorder->ord.sortop = (Oid *) palloc(sizeof(Oid) * (len + 1));
for (i = 0; i < len; i++)
newnode->path_order->ord.sortop[i] = ordering[i];
newnode->path_order->ord.sortop[len] = 0;
newnode->pathorder->ord.sortop[i] = ordering[i];
newnode->pathorder->ord.sortop[len] = 0;
}
}
else
Node_Copy(from, newnode, path_order->ord.merge);
Node_Copy(from, newnode, pathorder->ord.merge);
Node_Copy(from, newnode, pathkeys);