1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Change the notation for calling functions with named parameters from

"val AS name" to "name := val", as per recent discussion.

This patch catches everything in the original named-parameters patch,
but I'm not certain that no other dependencies snuck in later (grepping
the source tree for all uses of AS soon proved unworkable).

In passing I note that we've dropped the ball at least once on keeping
ecpg's lexer (as opposed to parser) in sync with the backend.  It would
be a good idea to go through all of pgc.l and see if it's in sync now.
I didn't attempt that at the moment.
This commit is contained in:
Tom Lane
2010-05-30 18:10:41 +00:00
parent 2bde07c198
commit b12b7a9038
11 changed files with 105 additions and 102 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.223 2010/03/17 16:52:38 tgl Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.224 2010/05/30 18:10:40 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1386,12 +1386,12 @@ funcname_signature_string(const char *funcname, int nargs,
{
if (i)
appendStringInfoString(&argbuf, ", ");
appendStringInfoString(&argbuf, format_type_be(argtypes[i]));
if (i >= numposargs)
{
appendStringInfo(&argbuf, " AS %s", (char *) lfirst(lc));
appendStringInfo(&argbuf, "%s := ", (char *) lfirst(lc));
lc = lnext(lc);
}
appendStringInfoString(&argbuf, format_type_be(argtypes[i]));
}
appendStringInfoChar(&argbuf, ')');