1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +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:
Tom Lane
1999-12-10 07:37:35 +00:00
parent ecba5d308c
commit 18c3000286
11 changed files with 220 additions and 114 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.49 1999/11/22 17:56:21 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.50 1999/12/10 07:37:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -337,16 +337,16 @@ SizeTargetExpr(ParseState *pstate,
if (HeapTupleIsValid(ftup))
{
FuncCall *func;
A_Const *cons;
A_Const *cons = makeNode(A_Const);
FuncCall *func = makeNode(FuncCall);
func = makeNode(FuncCall);
func->funcname = funcname;
cons = makeNode(A_Const);
cons->val.type = T_Integer;
cons->val.val.ival = attrtypmod;
func->funcname = funcname;
func->args = lappend(lcons(expr, NIL), cons);
func->agg_star = false;
func->agg_distinct = false;
expr = transformExpr(pstate, (Node *) func, EXPR_COLUMN_FIRST);
}