1
0
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:
Tom Lane
2009-10-08 02:39:25 +00:00
parent 2eda8dfb52
commit 717fa274d1
34 changed files with 1925 additions and 274 deletions

View File

@ -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;