Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dthD3-0005vq-U6 for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Sep 2017 21:34:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dthD3-0000yu-Ar for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Sep 2017 21:34: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 1dthD2-0000xT-0N for pgsql-hackers@postgresql.org; Sun, 17 Sep 2017 21:34:36 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dthCy-0005vH-DV for pgsql-hackers@postgresql.org; Sun, 17 Sep 2017 21:34:35 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E153C21C1D09; Mon, 18 Sep 2017 00:34:30 +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 98E7B21C0552; Mon, 18 Sep 2017 00:34:30 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1505684070; bh=Lt44oeMB0gCX1rSd5mJKUxyh25FrKcpGMyLPlSy0uJs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SmvApXB/6CLSuUHpdxpe9ResMO0H0uDxcCDuRRDLCx+ODRk7q6tKJUnRhVSGIelHp KtcZxvPWF+9Kc4JBjo5O5TYFnNtj1if2MLEfcFUw0/c/CZDQFJmThGnbzzGvUqNXdp tzWHeWaJX24AJfYIByO3HQP3WM7/fcrsEBguIiZk= Date: Mon, 18 Sep 2017 00:34:29 +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: <20170917213427.GA4430@arthur.localdomain> References: <20170909213349.GA17898@arthur.localdomain> <4675.1505164755@sss.pgh.pa.us> <5907.1505166328@sss.pgh.pa.us> <20170916220454.GA15505@arthur.localdomain> 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 Sun, Sep 17, 2017 at 12:27:58AM +0200, Dmitry Dolgov wrote: > spite of what form this step will be. Maybe it's possible to make something > like `CREATE FUNCTION ... FOR SUBSCRIPTING`, then verify that assign/extract > functions are presented and notify user if he missed them (but I would > rather > not do this unless it's really necessary, since it looks like an overkill). > > But I'm open to any suggestions, do you have something in mind? I have put some thought into it. What about the following syntax? CREATE SUBSCRIPTING FOR type_name INITFUNC = subscripting_init_func FETCHFUNC = subscripting_fetch_func ASSIGNFUNC = subscripting_assign_func DROP SUBSCRIPTING FOR type_name But I am not if the community will like such syntax. -- 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