Re: postgres_fdw aggregate pushdown for group by with expressions - Mailing list pgsql-general

From Michał Kłeczek
Subject Re: postgres_fdw aggregate pushdown for group by with expressions
Date
Msg-id 1BFADE7F-647F-4BCA-8AA4-9E8CC2260898@kleczek.org
Whole thread Raw
In response to Re: postgres_fdw aggregate pushdown for group by with expressions  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Thanks for help.

I’ve performed some more tests and it seems expressions with “extract” function are not pushed down at all -
the WHERE criteria from the following query are not pushed down as well and filter is performed locally:
SELECT
  *
FROM
  t1
WHERE extract(YEAR FROM date_column) = 2023
I was under impression that “extract” meets all criteria for pushable expressions - looks like I am wrong?
What would be the expression to achieve the same but such that postgres_fdw would push it down?

What Postgres versions on both ends?

16.1 on both sides


What does

select proname, prosrc,  provolatile from pg_proc where proname = 'extract';

return?

extract | extract_date | i

(and bunch of similar records for other types - for timestampz provolatile is “s”)

Michal

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: postgres_fdw aggregate pushdown for group by with expressions
Next
From: Tom Lane
Date:
Subject: Re: postgres_fdw aggregate pushdown for group by with expressions