Re: postgres_fdw aggregate pushdown for group by with expressions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michał Kłeczek <michal(at)kleczek(dot)org>
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-04 15:22:28
Message-ID: 3598577.1709565748@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?utf-8?Q?Micha=C5=82_K=C5=82eczek?= <michal(at)kleczek(dot)org> writes:
> 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.

If it contains text constants and not text variables, possibly so.
Keep in mind though that this rule is applied after constant-folding,
so that what we're left with is normally going to contain variables
at every level. extract() is problematic because it combines a
text constant with a datetime (collation-less) variable.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Koschicek-Krombholz, Bernhard 2024-03-04 16:01:46 Support for dates before 4713 BC
Previous Message Francisco Olarte 2024-03-04 15:04:50 Re: Inconsistent results in timestamp/interval comparison