mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Teach grammar and parser about aggregate(DISTINCT ...). No implementation
yet, but at least we can give a better error message: regression=> select count(distinct f1) from int4_tbl; ERROR: aggregate(DISTINCT ...) is not implemented yet instead of 'parser: parse error at or near distinct'.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.59 1999/11/15 02:00:10 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.60 1999/12/10 07:37:35 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -106,8 +106,10 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
Node *lexpr = transformExpr(pstate, a->lexpr, precedence);
|
||||
|
||||
result = ParseFuncOrColumn(pstate,
|
||||
"nullvalue", lcons(lexpr, NIL),
|
||||
&pstate->p_last_resno,
|
||||
"nullvalue",
|
||||
lcons(lexpr, NIL),
|
||||
false, false,
|
||||
&pstate->p_last_resno,
|
||||
precedence);
|
||||
}
|
||||
break;
|
||||
@ -116,8 +118,10 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
Node *lexpr = transformExpr(pstate, a->lexpr, precedence);
|
||||
|
||||
result = ParseFuncOrColumn(pstate,
|
||||
"nonnullvalue", lcons(lexpr, NIL),
|
||||
&pstate->p_last_resno,
|
||||
"nonnullvalue",
|
||||
lcons(lexpr, NIL),
|
||||
false, false,
|
||||
&pstate->p_last_resno,
|
||||
precedence);
|
||||
}
|
||||
break;
|
||||
@ -192,6 +196,8 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
result = ParseFuncOrColumn(pstate,
|
||||
fn->funcname,
|
||||
fn->args,
|
||||
fn->agg_star,
|
||||
fn->agg_distinct,
|
||||
&pstate->p_last_resno,
|
||||
precedence);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user