Re: [PATCH] Generic type subscripting

From: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Steele <david(at)pgmasters(dot)net>, peter(dot)eisentraut(at)2ndquadrant(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Generic type subscripting
Date: 2017-04-05 14:33:52
Message-ID: 12d8e0d0-e0ed-2846-cb8b-431f17e7d8c7@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-04-05 14:36:39 Re: Functions Immutable but not parallel safe?
Previous Message Andres Freund 2017-04-05 14:33:17 Re: Statement timeout behavior in extended queries