mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Support use of function argument names to identify which actual arguments
match which function parameters. The syntax uses AS, for example funcname(value AS arg1, anothervalue AS arg2) Pavel Stehule
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.441 2009/10/07 22:14:20 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.442 2009/10/08 02:39:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1019,6 +1019,22 @@ _copyFuncExpr(FuncExpr *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyNamedArgExpr *
|
||||
*/
|
||||
static NamedArgExpr *
|
||||
_copyNamedArgExpr(NamedArgExpr *from)
|
||||
{
|
||||
NamedArgExpr *newnode = makeNode(NamedArgExpr);
|
||||
|
||||
COPY_NODE_FIELD(arg);
|
||||
COPY_STRING_FIELD(name);
|
||||
COPY_SCALAR_FIELD(argnumber);
|
||||
COPY_LOCATION_FIELD(location);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyOpExpr
|
||||
*/
|
||||
@ -3587,6 +3603,9 @@ copyObject(void *from)
|
||||
case T_FuncExpr:
|
||||
retval = _copyFuncExpr(from);
|
||||
break;
|
||||
case T_NamedArgExpr:
|
||||
retval = _copyNamedArgExpr(from);
|
||||
break;
|
||||
case T_OpExpr:
|
||||
retval = _copyOpExpr(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user