Re: Optimze usage of immutable functions as relation

Anthony Bykov <a.bykov@postgrespro.ru>

From: Anthony Bykov <a.bykov@postgrespro.ru>
To: pgsql-hackers@lists.postgresql.org
Cc: Aleksandr Parfenov <asp437@gmail.com>
Date: 2018-10-19T09:39:56Z
Lists: pgsql-hackers
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.