aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-12-10 07:37:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-12-10 07:37:35 +0000
commit18c30002863a1a4d2c2f0da6d245f106586bc686 (patch)
treeb417e01845965594239b0f8944e1baf00688b12e /src/backend/parser/parse_expr.c
parentecba5d308ca92d3a4fd0725c200452007217991b (diff)
downloadpostgresql-18c30002863a1a4d2c2f0da6d245f106586bc686.tar.gz
postgresql-18c30002863a1a4d2c2f0da6d245f106586bc686.zip
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'.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 76e5f91f1a8..ee43be41950 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -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;