diff options
Diffstat (limited to 'src/backend/parser')
| -rw-r--r-- | src/backend/parser/gram.y | 16 | ||||
| -rw-r--r-- | src/backend/parser/parse_func.c | 6 | ||||
| -rw-r--r-- | src/backend/parser/scan.l | 4 |
3 files changed, 12 insertions, 14 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 368586a95e..c75bc825a8 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.711 2010/02/23 22:51:42 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.712 2010/05/30 18:10:40 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -444,8 +444,8 @@ static TypeName *TableFuncTypeName(List *columns); * the set of keywords. PL/pgsql depends on this so that it can share the * same lexer. If you add/change tokens here, fix PL/pgsql to match! * - * DOT_DOT and COLON_EQUALS are unused in the core SQL grammar, and so will - * always provoke parse errors. They are needed by PL/pgsql. + * DOT_DOT is unused in the core SQL grammar, and so will always provoke + * parse errors. It is needed by PL/pgsql. */ %token <str> IDENT FCONST SCONST BCONST XCONST Op %token <ival> ICONST PARAM @@ -10212,13 +10212,13 @@ func_arg_expr: a_expr { $$ = $1; } - | a_expr AS param_name + | param_name COLON_EQUALS a_expr { NamedArgExpr *na = makeNode(NamedArgExpr); - na->arg = (Expr *) $1; - na->name = $3; + na->name = $1; + na->arg = (Expr *) $3; na->argnumber = -1; /* until determined */ - na->location = @3; + na->location = @1; $$ = (Node *) na; } ; @@ -10698,7 +10698,7 @@ AexprConst: Iconst if (IsA(arg, NamedArgExpr)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("type modifier cannot have AS name"), + errmsg("type modifier cannot have parameter name"), parser_errposition(arg->location))); } t->typmods = $3; diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 8a2663c232..5de08dc78c 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -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, ')'); diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index b09187a2c0..81502adc95 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -24,7 +24,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.166 2010/01/16 17:39:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.167 2010/05/30 18:10:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -317,8 +317,6 @@ ident_cont [A-Za-z\200-\377_0-9\$] identifier {ident_start}{ident_cont}* typecast "::" - -/* these two token types are used by PL/pgsql, though not in core SQL */ dot_dot \.\. colon_equals ":=" |
