Re: Lack of T_TargetEntry in exprType function

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Lack of T_TargetEntry in exprType function
Date: 2018-03-20 14:21:21
Message-ID: 36db3d92-08e4-e18a-d185-5cce9795887b@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20.03.2018 17:00, Tom Lane wrote:
> Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2018-03-20 14:23:12 Re: configure's checks for --enable-tap-tests are insufficient
Previous Message Merlin Moncure 2018-03-20 14:18:15 Re: INOUT parameters in procedures