Re: SET or STRICT modifiers on function affect planner row estimates

2024-10-01 Thread Michał Kłeczek
Hi Tom, > On 30 Sep 2024, at 21:24, Tom Lane wrote: > > =?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: >>> > >> The table structure is as follows: > >> CREATE TABLE tbl (…) PARTITION BY RANGE year(col02_date) > > You're still expecting people to magically intuit what all those > "..."s are.

Re: SET or STRICT modifiers on function affect planner row estimates

2024-09-30 Thread Tom Lane
=?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: >> On 30 Sep 2024, at 14:14, Ashutosh Bapat >> wrote: >> It is difficult to understand the exact problem from your description. >> Can you please provide EXPLAIN outputs showing the expected plan and >> the unexpected plan; plans on the node where the

Re: SET or STRICT modifiers on function affect planner row estimates

2024-09-30 Thread Michał Kłeczek
Hi, Thanks for taking a look. > On 30 Sep 2024, at 14:14, Ashutosh Bapat wrote: > > Hi Michal, > It is difficult to understand the exact problem from your description. > Can you please provide EXPLAIN outputs showing the expected plan and > the unexpected plan; plans on the node where the query

Re: SET or STRICT modifiers on function affect planner row estimates

2024-09-30 Thread Ashutosh Bapat
Hi Michal, It is difficult to understand the exact problem from your description. Can you please provide EXPLAIN outputs showing the expected plan and the unexpected plan; plans on the node where the query is run and where the partitions are located. On Mon, Sep 30, 2024 at 12:19 AM Michał Kłeczek

SET or STRICT modifiers on function affect planner row estimates

2024-09-29 Thread Michał Kłeczek
Hi Hackers, I am not sure if this is a bug or I am missing something: There is a partitioned table with partitions being a mix of foreign and regular tables. I have a function: report(param text) RETURNS TABLE(…) STABLE LANGUAGE sql AS $$ SELECT col1, expr1(col2), expr2(col2), sum(col3) FROM tb