postgres_fdw does not push down DISTINCT - Mailing list pgsql-general

From Christophe Pettus
Subject postgres_fdw does not push down DISTINCT
Date
Msg-id 9EE5AAB4-36FC-4FF0-9B0E-CF7B5221D8D1@thebuild.com
Whole thread Raw
List pgsql-general
While working on a different FDW, I discovered that postgres_fdw doesn't push a DISTINCT clause to the foreign server,
unlessit's part of an aggregate function: 

k=# explain verbose select distinct i from tf;
                                QUERY PLAN
--------------------------------------------------------------------------
 HashAggregate  (cost=193.20..195.20 rows=200 width=8)
   Output: i
   Group Key: tf.i
   ->  Foreign Scan on public.tf  (cost=100.00..186.80 rows=2560 width=8)
         Output: i, f
         Remote SQL: SELECT i FROM public.tf
(6 rows)

Of course, the same effect can be achieved with GROUP BY, but I'm curious why it doesn't push it down?


pgsql-general by date:

Previous
From: Bryn Llewellyn
Date:
Subject: Re: Test if a database has any privilege granted to public
Next
From: "David G. Johnston"
Date:
Subject: Re: Test if a database has any privilege granted to public