Re: Parameterized aggregate subquery (was: Pull up aggregate subquery)

From: Yeb Havinga <yebhavinga(at)gmail(dot)com>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parameterized aggregate subquery (was: Pull up aggregate subquery)
Date: 2011-07-22 15:16:30
Message-ID: 4E29944E.4050704@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2011-07-22 16:17, Hitoshi Harada wrote:
>
> :(
> I updated the patch. Could you try attached once more? The "issafe"
> switch seems wrong.
Works like a charm :-). However, now there is always a copyObject of a
subquery even when the subquery is not safe for qual pushdown. The
problem with the previous issafe was that it was only assigned for
rel->baserestrictinfo != NIL. If it is assigned before the if statement,
it still works. See attached patch that avoids subquery copy for unsafe
subqueries, and also exits best_inner_subqueryscan before palloc of
differenttypes in case of unsafe queries.

regards,
--

Yeb Havinga
http://www.mgrid.net/
Mastering Medical Data

Attachment Content-Type Size
aggjoin-v2.patch text/x-patch 33.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-07-22 15:20:55 Re: Deriving release notes from git commit messages
Previous Message Joshua D. Drake 2011-07-22 14:51:35 Re: Policy on pulling in code from other projects?