Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqnPe-0001m3-QT for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Sep 2017 21:35:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dqnPd-0000Hs-64 for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Sep 2017 21:35:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dqnO4-0005vr-3a for pgsql-hackers@postgresql.org; Sat, 09 Sep 2017 21:34:00 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqnNx-0001V0-QU for pgsql-hackers@postgresql.org; Sat, 09 Sep 2017 21:33:56 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E77A521C1CE2; Sun, 10 Sep 2017 00:33:51 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from arthur.localdomain (ppp79-139-233-35.pppoe.spdop.ru [79.139.233.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 8959221C04AD; Sun, 10 Sep 2017 00:33:51 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1504992831; bh=f39sYt/drr6Q8rgY9DCf4g2xnaAaQlJKwR5Bl4ep+V4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=I2iwgSypLgPKYH7Do+Z5BhQczYU7zfp9ykQABLZ9CEfIBq/W4HdPn0U1l2v+IwWCF J8kgdHrb5HkDzQP4JvdFvzuusBa7YoapARHSoYA0euqzOitbrUls+RB5m0Fugccx8T UF3zMfGLx8OtKL6ELNUAO62I4V9pMH8JzZot7OzU= Date: Sun, 10 Sep 2017 00:33:49 +0300 From: Arthur Zakirov To: Dmitry Dolgov <9erthalion6@gmail.com> Cc: Tom Lane , David Steele , Peter Eisentraut , PostgreSQL-development Subject: Re: [PATCH] Generic type subscripting Message-ID: <20170909213349.GA17898@arthur.localdomain> References: <3939224.Pu1MPp1GC3@zakirov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.0 (2017-09-02) 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 Thu, Sep 07, 2017 at 10:49:54PM +0200, Dmitry Dolgov wrote: > On 29 August 2017 at 22:42, Dmitry Dolgov <9erthalion6@gmail.com> wrote: > > > > To make a review little bit easier I've divided the patch into a few > smaller parts. > > Apparently I forgot about subscripting for the name data type, so here is a > small update of the patch. Thank you for rebasing the patch! PostgreSQL and documentation with the patch compiles without any errors. All regression tests passed. But honestly I still cannot say that I agree with *_extract() and *_assign() functions creation way. For example, there is no entry in pg_depend for them (related with pg_type entry). Because there is no such entry, there is the following bug: 1 - make and install src/tutorial 2 - run src/tutorial/subscripting.sql 3 - run: =# drop function custom_subscripting_extract(internal); 4 - and we get the error: =# select data[0] from test_subscripting; ERROR: function 0x55deb7911bfd returned NULL But of course it is only my opinion and I could be wrong. -- 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