1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Fixed wrong hasAggs when aggregate columns of view aren't

selected.

Disabled ability of defining DISTINCT or ORDER BY on views.

Jan
This commit is contained in:
Jan Wieck
1999-05-12 17:04:47 +00:00
parent 79c2576f77
commit b7a86e4046
2 changed files with 146 additions and 4 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.27 1999/05/10 00:45:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.28 1999/05/12 17:04:46 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@ -317,6 +317,18 @@ DefineQueryRewrite(RuleStmt *stmt)
if (query->limitOffset != NULL || query->limitCount != NULL)
elog(ERROR, "LIMIT clause not supported in views");
/*
* DISTINCT on view is not supported
*/
if (query->uniqueFlag != NULL)
elog(ERROR, "DISTINCT not supported in views");
/*
* ORDER BY in view is not supported
*/
if (query->sortClause != NIL)
elog(ERROR, "ORDER BY not supported in views");
/*
* ... and finally the rule must be named _RETviewname.
*/