On 20.03.2018 17:00, Tom Lane wrote:
Konstantin Knizhnik <k.knizh...@postgrespro.ru> writes:
Is there any reason for not handling T_TargetEntry node kind in
exprType() function in nodeFuncs.c?
It's intentional because that's not considered an executable
expression.

I tried to apply this function to the argument of Aggref and it has exactly this kind. Aggref is executable expression. This is why I thought that all its arguments also should be considered as executable expressions, shouldn't they? My idea was to capture argument of one aggregate and useĀ  it in another aggregate during query transformation. Certainly it is not a problem for me to handle this case myself, but I just wonder will it be more natural to extend exprType to handle this node kind as well.


But why in this case it is handled in the exprLocation function?
There are lots of things that have syntactic locations but aren't
value-yielding expressions.

                        regards, tom lane

--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


Reply via email to