Re: [HACKERS] Re: [SQL] cursor and update + view - Mailing list pgsql-sql

From Vadim Mikheev
Subject Re: [HACKERS] Re: [SQL] cursor and update + view
Date
Msg-id 365ABC07.9534B144@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Re: [SQL] cursor and update + view  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] Re: [SQL] cursor and update + view  (jwieck@debis.com (Jan Wieck))
List pgsql-sql
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

pgsql-sql by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] Re: [SQL] cursor and update + view
Next
From: pierre@desertmoon.com
Date:
Subject: Re: [SQL] MINUS and slow 'not in'