mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Creates the SubLink structure, and the Query->hasSubLink field,
with supporting code. Creates SubLink node in gram.y. psql.c patch for newatttypmod field.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.31 1998/01/16 23:19:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.32 1998/01/17 04:53:07 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -892,6 +892,28 @@ _copyAggreg(Aggreg *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
* _copySubLink
|
||||
* ----------------
|
||||
*/
|
||||
static SubLink *
|
||||
_copySubLink(SubLink *from)
|
||||
{
|
||||
SubLink *newnode = makeNode(SubLink);
|
||||
|
||||
/* ----------------
|
||||
* copy remainder of node
|
||||
* ----------------
|
||||
*/
|
||||
newnode->subLinkType = from->subLinkType;
|
||||
newnode->useor = from->useor;
|
||||
Node_Copy(from, newnode, lefthand);
|
||||
Node_Copy(from, newnode, oper);
|
||||
Node_Copy(from, newnode, subselect);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static Array *
|
||||
_copyArray(Array *from)
|
||||
{
|
||||
@ -1517,6 +1539,7 @@ _copyQuery(Query *from)
|
||||
Node_Copy(from, newnode, havingQual);
|
||||
|
||||
newnode->hasAggs = from->hasAggs;
|
||||
newnode->hasSubLinks = from->hasSubLinks;
|
||||
|
||||
if (from->unionClause)
|
||||
{
|
||||
@ -1673,6 +1696,9 @@ copyObject(void *from)
|
||||
case T_Aggreg:
|
||||
retval = _copyAggreg(from);
|
||||
break;
|
||||
case T_SubLink:
|
||||
retval = _copySubLink(from);
|
||||
break;
|
||||
|
||||
/*
|
||||
* RELATION NODES
|
||||
|
Reference in New Issue
Block a user