mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Code review for UPDATE tab SET col = DEFAULT patch ... whack it around
so it has some chance of working in rules ...
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.258 2003/06/29 00:33:43 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.259 2003/07/03 16:32:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1041,6 +1041,20 @@ _copyCoerceToDomainValue(CoerceToDomainValue *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copySetToDefault
|
||||
*/
|
||||
static SetToDefault *
|
||||
_copySetToDefault(SetToDefault *from)
|
||||
{
|
||||
SetToDefault *newnode = makeNode(SetToDefault);
|
||||
|
||||
COPY_SCALAR_FIELD(typeId);
|
||||
COPY_SCALAR_FIELD(typeMod);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyTargetEntry
|
||||
*/
|
||||
@@ -1669,14 +1683,6 @@ _copyFuncWithArgs(FuncWithArgs *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static SetToDefault *
|
||||
_copySetToDefault(SetToDefault *from)
|
||||
{
|
||||
SetToDefault *newnode = makeNode(SetToDefault);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static DeclareCursorStmt *
|
||||
_copyDeclareCursorStmt(DeclareCursorStmt *from)
|
||||
{
|
||||
@@ -2607,6 +2613,9 @@ copyObject(void *from)
|
||||
case T_CoerceToDomainValue:
|
||||
retval = _copyCoerceToDomainValue(from);
|
||||
break;
|
||||
case T_SetToDefault:
|
||||
retval = _copySetToDefault(from);
|
||||
break;
|
||||
case T_TargetEntry:
|
||||
retval = _copyTargetEntry(from);
|
||||
break;
|
||||
@@ -2955,9 +2964,6 @@ copyObject(void *from)
|
||||
case T_FuncWithArgs:
|
||||
retval = _copyFuncWithArgs(from);
|
||||
break;
|
||||
case T_SetToDefault:
|
||||
retval = _copySetToDefault(from);
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ERROR, "copyObject: don't know how to copy node type %d",
|
||||
|
||||
Reference in New Issue
Block a user