Re: [PATCH] Generic type subscripting - Mailing list pgsql-hackers

From Arthur Zakirov
Subject Re: [PATCH] Generic type subscripting
Date
Msg-id 12d8e0d0-e0ed-2846-cb8b-431f17e7d8c7@postgrespro.ru
Whole thread Raw
In response to Re: [PATCH] Generic type subscripting  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
List pgsql-hackers
On 05.04.2017 16:06, Arthur Zakirov wrote:
> On 04.04.2017 15:41, Dmitry Dolgov wrote:
>> Sorry for late reply. Here is a new version of the patch, I rebased it
>> and
>> fixed those issues you've mentioned (pretty nasty problems, thank you for
>> noticing).
>
> Thank you!
>
> I've looked at the patch again.
>

Sorry maybe it's too naive. Also I was wondering.

> +    element_type_id = transformArrayType(&array_type, &array_typ_mode);
> +    sbsref->refelemtype = element_type_id;

I don't understand this part of the patch. Why is it necessary to 
execute transformArrayType() second time? It was executed in 
transformContainerSubscripts().

> +    if (!OidIsValid(elementType))
> +        elementType = containerType;

This part looks strange to me too.

It this parts are necessary it would be good to add comments.

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Statement timeout behavior in extended queries
Next
From: Tom Lane
Date:
Subject: Re: Functions Immutable but not parallel safe?