Re: Optimze usage of immutable functions as relation
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: rmrodriguez@carto.com
Cc: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>,
pgsql-hackers@lists.postgresql.org
Date: 2019-09-24T15:17:11Z
Lists: pgsql-hackers
rmrodriguez@carto.com writes: > This commit is breaking some Postgis tests with custom types. Hm, yeah, the code fails to consider the possibility that the function returns a composite type. For the moment I'm just going to make it punt if the function result class isn't TYPEFUNC_SCALAR. In principle, if we have a composite result, we could disassemble it into per-column constant values, but I'm not sure it'd be worth the work. regards, tom lane
Commits
-
Prevent bogus pullup of constant-valued functions returning composite.
- a9ae99d01909 13.0 landed
-
Allow functions-in-FROM to be pulled up if they reduce to constants.
- 7266d0997dd2 13.0 landed