Re: Removing useless DISTINCT clauses - Mailing list pgsql-hackers

From Jim Finnerty
Subject Re: Removing useless DISTINCT clauses
Date
Msg-id 1535030950581-0.post@n3.nabble.com
Whole thread Raw
In response to Re: Removing useless DISTINCT clauses  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Removing useless DISTINCT clauses
Re: Removing useless DISTINCT clauses
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw with partitionwise join enabled.
Next
From: Peter Eisentraut
Date:
Subject: Re: Memory leak with CALL to Procedure with COMMIT.