1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-21 00:42:43 +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

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: analyze.c,v 1.125 1999/12/06 18:02:42 wieck Exp $
* $Id: analyze.c,v 1.126 1999/12/10 07:37:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -624,6 +624,8 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
funccallnode = makeNode(FuncCall);
funccallnode->funcname = "nextval";
funccallnode->args = lcons(snamenode, NIL);
funccallnode->agg_star = false;
funccallnode->agg_distinct = false;
constraint = makeNode(Constraint);
constraint->contype = CONSTR_DEFAULT;