Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvm2G-0002S0-Ur for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Apr 2017 14:35:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cvm2G-0007bw-CE for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Apr 2017 14:35:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvm0i-0003a9-Gu for pgsql-hackers@postgresql.org; Wed, 05 Apr 2017 14:34:12 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvm0b-0004ol-6h for pgsql-hackers@postgresql.org; Wed, 05 Apr 2017 14:34:11 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id AB87F21C2A0F; Wed, 5 Apr 2017 17:34:03 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Subject: Re: [PATCH] Generic type subscripting DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1491402842; bh=m8kDtU9azZDX5rLY5BGMwDwLi2q4Di/cw+WDJvYf23A=; h=To:References:Cc:From:Date:In-Reply-To; b=VN4ymM1VYuRHtsfwLYdE/qLAOPHYrRvAz1B01LGU0o2F+YTRK+w8OwOr/9pxiQgty /sC41i83apK9FMlY7SfiaCBzCHGsmbGQUkEfdrsMl5hG7Gz2ZphS68eUL4E1k8GMYJ cgX3GyEaT3OVn//Y+42EA0o5uJVzCHUqlvXh6yrA= To: Dmitry Dolgov <9erthalion6@gmail.com> References: <20423.1489533013@sss.pgh.pa.us> <393cd0ae-5b84-849e-fc73-7077470a009e@pgmasters.net> <65df4a65-a9d8-3531-5baf-edb237771f0e@pgmasters.net> <22355.1490369372@sss.pgh.pa.us> <449f42b9-f338-9e45-cb33-3e15c7b547ad@postgrespro.ru> Cc: Tom Lane , David Steele , peter.eisentraut@2ndquadrant.com, PostgreSQL-development From: Arthur Zakirov Message-ID: <12d8e0d0-e0ed-2846-cb8b-431f17e7d8c7@postgrespro.ru> Date: Wed, 5 Apr 2017 17:33:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers