Re: postgres_fdw aggregate pushdown for group by with expressions

From: Michał Kłeczek <michal(at)kleczek(dot)org>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgres_fdw aggregate pushdown for group by with expressions
Date: 2024-03-03 17:04:31
Message-ID: 1BFADE7F-647F-4BCA-8AA4-9E8CC2260898@kleczek.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2024-03-03 17:42:53 Re: postgres_fdw aggregate pushdown for group by with expressions
Previous Message Adrian Klaver 2024-03-03 16:19:10 Re: postgres_fdw aggregate pushdown for group by with expressions