From 8ed721ffefd418124b8d69c7ad0fd0ac1532e239 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Tue, 23 Dec 1997 19:39:42 +0000 Subject: [PATCH] Change variable name reference from selectClause to more appropriate unionClause. Add a few lines of test code playing with the unique flag for unions. Does not do much helpful yet. --- src/backend/parser/analyze.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index b3e1d2203d..7c553f3625 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.54 1997/12/16 15:45:46 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.55 1997/12/23 19:39:42 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -822,9 +822,16 @@ transformSelectStmt(ParseState *pstate, RetrieveStmt *stmt) qry->qual = transformWhereClause(pstate, stmt->whereClause); /* check subselect clause */ - if (stmt->selectClause) + if (stmt->unionClause) + { elog(NOTICE, "UNION not yet supported; using first SELECT only", NULL); + /* XXX HACK just playing with union clause - thomas 1997-12-19 */ + if ((qry->uniqueFlag == NULL) + && (! ((SubSelect *)lfirst(stmt->unionClause))->unionall)) + qry->uniqueFlag = "*"; + } + /* check subselect clause */ if (stmt->havingClause) elog(NOTICE, "HAVING not yet supported; ignore clause", NULL); -- 2.40.0