Re: no partition pruning when partitioning using array type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: no partition pruning when partitioning using array type
Date
Msg-id 4384.1531169594@sss.pgh.pa.us
Whole thread Raw
In response to Re: no partition pruning when partitioning using array type  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> The same occurs in 11 and master.  I think this is because the
> polymorphic type is resolved for the function ahead of time (at
> table creation time); partexprs shows

>  ({FUNCEXPR :funcid 35757 :funcresulttype 23 :funcretset false :funcvariadic false :funcformat 0 :funccollid 0
:inputcollid0 :args ({VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1
:varoattno1 :location 46}) :location 44}) 

> where the ":funcresulttype 23" bit indicates that the function is
> returning type integer, which I find a bit odd.  I think if we were to
> leave it as funcresulttype anynonarray, pruning would work.

... at the cost of breaking many other things.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Fix crash when ALTER TABLE recreates indexes on partitions
Next
From: Tom Lane
Date:
Subject: Re: peripatus build failures....