postgres_fdw aggregate pushdown for group by with expressions

From: Michał Kłeczek <michal(at)kleczek(dot)org>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: postgres_fdw aggregate pushdown for group by with expressions
Date: 2024-03-03 09:34:08
Message-ID: AF30BDFB-7215-4E8C-BF11-C97573199D6C@kleczek.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have the following foreign table:

CREATE FOREIGN TABLE t1 (
grouping_column text,
date_column date,
whatever_data int
);

The query is:

SELECT
sum(whatever_data)
FROM
t1
GROUP BY
grouping_colulmn, extract(YEAR FROM date_column), extract(MONTH FROM date_column);

From my (preliminary) testing postgres_fdw will not push down this aggregate query
- it will happily push down query with only “grouping_column” or “grouping_column, date_column" in GROUP BY

Is there a way to somehow push down the query with expressions in GROUP BY?

Thanks,
Michal

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michał Kłeczek 2024-03-03 13:16:01 Re: postgres_fdw aggregate pushdown for group by with expressions
Previous Message Guyren Howe 2024-03-03 00:40:06 Thoughts on user-defined types for talk at Postgres conference?