Skip site navigation (1) Skip section navigation (2)

Re: Problem with subquery joined to a view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kyle <kyle(at)actarg(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with subquery joined to a view
Date: 2000-11-21 18:16:49
Message-ID: 2357.974830609@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Kyle <kyle(at)actarg(dot)com> writes:
> The fourth "select" uses a regular subquery.  It gives the error:
> psql:datbug.sql:44: ERROR:  Sub-SELECT uses un-GROUPed attribute
> pay_req.wdate from outer query

This appears to work correctly in current sources.  In 7.0.* and before
grouped views do not work very well, because the rewriter effectively
expands them in-line, thus converting your outer query into a grouped
query (or making it not work at all, if it was already grouped :-().

See related bug report just a few minutes ago on pgsql-bugs.

			regards, tom lane

In response to

pgsql-sql by date

Next:From: Ricardo Dias MarquesDate: 2000-11-21 18:56:36
Subject: CREATE OR REPLACE VIEW
Previous:From: KyleDate: 2000-11-21 17:51:20
Subject: Problem with subquery joined to a view

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group