Commit 81489528 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

Copy indexkeys in _copyIndexPath.

parent e6dfee30
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.4 1996/11/13 20:48:46 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.5 1997/04/10 07:59:09 vadim Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1074,6 +1074,19 @@ _copyIndexPath(IndexPath *from)
newnode->indexid = listCopy(from->indexid);
Node_Copy(from, newnode, indexqual);
if (from->indexkeys)
{
int i, len;
for(len=0; from->indexkeys[len]!=0; len++)
;
newnode->indexkeys = (int *)palloc(sizeof(int) * (len+1));
for(i=0; i < len; i++) {
newnode->indexkeys[i] = from->indexkeys[i];
}
newnode->indexkeys[len] = 0;
}
return newnode;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment