I was thinking about this last night and I realized that putting the new
hasModifiedDistinct flag on the PlannerInfo struct eliminates the need to
deal with the serialization issues, and makes it simpler.
Here's a new patch (v7) that puts the bool on the PlannerInfo struct, and
adds a couple of tests.
re: why did you apply the patch on v10?
I'm developing on a v10.5 codebase at the moment, though this will change
soon. If the v7 patch doesn't apply cleanly on later versions, please let
me know and I'll fix it.
re: if you're proposing the patch for v12, why do you care about catversion?
Only because it would be a problem to test the patch on 10.5 with a
catversion change that wouldn't come until v12. With the v7 patch this
issue is moot because it no longer requires a catversion change.
cheers,
/Jim
distinct_opt_v7.patch
<http://www.postgresql-archive.org/file/t348990/distinct_opt_v7.patch>
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html