diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-10-08 02:39:25 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-10-08 02:39:25 +0000 |
commit | 717fa274d14d9cd25396b85bb92f567e1c623f0c (patch) | |
tree | 4fe298a9faa1fc8f038a9a1f35ee033abc3e41ed /src/backend/nodes/equalfuncs.c | |
parent | 2eda8dfb52ed9962920282d8384da8bb4c22514d (diff) | |
download | postgresql-717fa274d14d9cd25396b85bb92f567e1c623f0c.tar.gz postgresql-717fa274d14d9cd25396b85bb92f567e1c623f0c.zip |
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
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 6a61112b99c..5766f37c143 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -22,7 +22,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.364 2009/10/07 22:14:20 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.365 2009/10/08 02:39:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -242,6 +242,17 @@ _equalFuncExpr(FuncExpr *a, FuncExpr *b) } static bool +_equalNamedArgExpr(NamedArgExpr *a, NamedArgExpr *b) +{ + COMPARE_NODE_FIELD(arg); + COMPARE_STRING_FIELD(name); + COMPARE_SCALAR_FIELD(argnumber); + COMPARE_LOCATION_FIELD(location); + + return true; +} + +static bool _equalOpExpr(OpExpr *a, OpExpr *b) { COMPARE_SCALAR_FIELD(opno); @@ -2375,6 +2386,9 @@ equal(void *a, void *b) case T_FuncExpr: retval = _equalFuncExpr(a, b); break; + case T_NamedArgExpr: + retval = _equalNamedArgExpr(a, b); + break; case T_OpExpr: retval = _equalOpExpr(a, b); break; |