Received: from dune.krs.ru (dune.krs.ru [195.161.16.38]) by hub.org (8.9.1/8.9.1) with ESMTP id JAA28415; Tue, 24 Nov 1998 09:08:33 -0500 (EST) (envelope-from vadim@krs.ru) Received: from krs.ru (localhost.krs.ru [127.0.0.1]) by dune.krs.ru (8.8.8/8.8.7) with ESMTP id VAA22273; Tue, 24 Nov 1998 21:00:40 +0700 (KRS) (envelope-from vadim@krs.ru) Sender: root@dune.krs.ru Message-ID: <365ABC07.9534B144@krs.ru> Date: Tue, 24 Nov 1998 21:00:39 +0700 From: Vadim Mikheev Organization: OJSC Rostelecom (Krasnoyarsk) X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 2.2.6-RELEASE i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Jan Wieck CC: s-fery@kkt.sote.hu, pgsql-sql@postgreSQL.org, hackers@postgreSQL.org Subject: Re: [HACKERS] Re: [SQL] cursor and update + view References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jan Wieck wrote: > > There is another thing that I would like to have. The current > rule system tries to turn a qualification that uses an > aggregate column of a view into a subquery. This is because > the planner doesn't support plain aggregate expressions in > the qualification. If it would be possible to have another > type of Var node that points to a targetlist entry, we could > put the aggregates from the qualification into junk TLE's. This thing would also handled by subqueries in FROM! Having support in planner/executor for queries like this: select * from A, (select c, max(d) as m from B group by c) SQ where SQ.c = A.x and SQ.m = A.y rule system will be able to put _any_ VIEW' query into FROM clause... Vadim