I've been trying to figure out an issue with operators not being pushed
down for user defined types, in this case "hstore". TL;DR:

hstore=# explain (verbose) select * from hs_fdw where h -> 'a' = '1';
                              QUERY PLAN
 Foreign Scan on public.hs_fdw  (cost=100.00..157.78 rows=7 width=36)
   Output: id, h
   Filter: ((hs_fdw.h -> 'a'::text) = '1'::text)
   Remote SQL: SELECT id, h FROM public.hs
(4 rows)

In terms of "shippability" the "->" operator passes fine. It ends up not
being shipped because its collation bubbles up as FDW_COLLATE_NONE, and
gets kicked back as not deparseable around here:


I'm still working at wrapping my head around why this is good or not, but
if there's an obvious explanation and/or workaround, I'd love to know.



Reply via email to