Re: Lack of T_TargetEntry in exprType function

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Lack of T_TargetEntry in exprType function
Дата
Msg-id 36db3d92-08e4-e18a-d185-5cce9795887b@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Lack of T_TargetEntry in exprType function  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Lack of T_TargetEntry in exprType function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 20.03.2018 17:00, Tom Lane wrote:
> Konstantin Knizhnik <k.knizhnik@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: INOUT parameters in procedures
Следующее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: configure's checks for --enable-tap-tests are insufficient