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 5CE71232-CD60-4186-BBCB-2780D4C71F63@kleczek.org
Whole thread Raw
In response to Re: postgres_fdw aggregate pushdown for group by with expressions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: postgres_fdw aggregate pushdown for group by with expressions
Re: postgres_fdw aggregate pushdown for group by with expressions
List pgsql-general

> On 3 Mar 2024, at 18:42, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> =?utf-8?Q?Micha=C5=82_K=C5=82eczek?= <michal@kleczek.org> writes:
>> I’ve performed some more tests and it seems expressions with “extract” function are not pushed down at all -
>
> Yeah :-(.  I traced through this, and it seems it's a collation
> problem.  Internally, that call looks like
>     extract('year'::text, date_column)
> The text constant is marked as having collation "default", which means
> that extract() is marked as having input collation "default", and then
> it falls foul of this rule:
[snip]

Thanks for explanation - I have a follow-up question.

Does that mean that *any* expression containing text constants is not going to be pushed down??
That would be a really serious issues I’d say.

—
Michal


pgsql-general by date:

Previous
From: veem v
Date:
Subject: Re: When manual analyze is needed
Next
From: Michał Kłeczek
Date:
Subject: Re: postgres_fdw aggregate pushdown for group by with expressions