1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Fix Query handling for inheritance, and cost computations.

This commit is contained in:
Bruce Momjian
1997-12-18 03:03:41 +00:00
parent d451a3b3bc
commit c64cc3228a
4 changed files with 27 additions and 14 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.16 1997/11/25 21:59:40 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.17 1997/12/18 03:03:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -516,7 +516,7 @@ _copyAgg(Agg *from)
CopyTempFields((Temp *) from, (Temp *) newnode);
newnode->numAgg = from->numAgg;
newnode->aggs = malloc(sizeof(Aggreg *));
newnode->aggs = palloc(sizeof(Aggreg *));
for (i = 0; i < from->numAgg; i++)
{
newnode->aggs[i] = copyObject(from->aggs[i]);
@ -1519,7 +1519,7 @@ static Query *
_copyQuery(Query *from)
{
Query *newnode = makeNode(Query);
newnode->commandType = from->commandType;
newnode->resultRelation = from->resultRelation;
/* probably should dup this string instead of just pointing */
@ -1555,6 +1555,11 @@ _copyQuery(Query *from)
Node_Copy(from, newnode, targetList);
Node_Copy(from, newnode, qual);
Node_Copy(from, newnode, groupClause);
Node_Copy(from, newnode, havingQual); /* currently ignored */
Node_Copy(from, newnode, Aggreg);
return newnode;
}