Re: Optimze usage of immutable functions as relation

Aleksandr Parfenov <asp437@gmail.com>

From: Aleksandr Parfenov <asp437@gmail.com>
To: a.bykov@postgrespro.ru
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-10-19T18:31:04Z
Lists: pgsql-hackers

Attachments

Hi,

Thank you for the review.
I fixed a typo and some comments. Please find new version attached.

---
Best regards,
Parfenov Aleksandr

On Fri, 19 Oct 2018 at 16:40, Anthony Bykov <a.bykov@postgrespro.ru> wrote:

> The following review has been posted through the commitfest application:
> make installcheck-world:  tested, failed
> Implements feature:       not tested
> Spec compliant:           not tested
> Documentation:            not tested
>
> Hello,
> I was trying to review your patch, but I couldn't install it:
>
> prepjointree.c: In function ‘pull_up_simple_function’:
> prepjointree.c:1793:41: error: ‘functions’ undeclared (first use in this
> function); did you mean ‘PGFunction’?
>   Assert(!contain_vars_of_level((Node *) functions, 0));
>
> Was it a typo?
>
> The new status of this patch is: Waiting on Author
>

Commits

  1. Prevent bogus pullup of constant-valued functions returning composite.

  2. Allow functions-in-FROM to be pulled up if they reduce to constants.