Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dufBL-00072j-95 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 13:36:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dufBK-00024x-S7 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 13:36:50 +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 1duf9h-0003uw-FX for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 13:35:09 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1duf9a-0005F0-Gx for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 13:35:08 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 46C3520D90; Wed, 20 Sep 2017 09:35:01 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Wed, 20 Sep 2017 09:35:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=IVvAoQaZ9usYs/HssRwdZ1KjBS/F16Z2CfXkeCbJ9dA=; b=I7u8wwSt OJP4+K5aLwNVHSrKTeO2phZW9rpJjXEokAkqUwIcVEy3ZO/hocqLrg18bpXPHx3J Z1ccii9QlIA3CIlWPpGaibFGVFZtA+2JNnqSQYroP+WRMjYMD7zw8P53meuigiO4 l/W+EFFp/Pgzt9KoucthQn4AbogqCNkGo1PK0Q2FeWu3O7Ko7l/d4JMOQSGZrgRG d2bzeglcYC5voCGOwvIlKD1p+S2Fa7Zi6VmjlGVw7rINKpS6JRBhK+eIt9IDgP/U ReRm2Lz7WFWZG2g8ZnD7pXu7rZPSsAPaca8aK4IqKc9eOFXuyg8HPUfdV1JNnr1z BUUwFetfWHrmvQ== X-ME-Sender: X-Sasl-enc: /fOWNbi+PLLhBwWc3Jm9KXODI+f7LiVuLnxc07+Zwmo2 1505914501 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id CE17F24B9E; Wed, 20 Sep 2017 09:35:00 -0400 (EDT) Subject: Re: [PATCH] Generic type subscripting To: Arthur Zakirov References: <5907.1505166328@sss.pgh.pa.us> <20170916220454.GA15505@arthur.localdomain> <20170917213427.GA4430@arthur.localdomain> <20170918093943.GA3473@zakirov.localdomain> <390c5fe0-bced-9d4d-6167-82896efa93bf@2ndquadrant.com> <20170920081226.GA7166@zakirov.localdomain> Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Tom Lane , David Steele , PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Wed, 20 Sep 2017 09:35:06 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170920081226.GA7166@zakirov.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 9/20/17 04:12, Arthur Zakirov wrote: > On Tue, Sep 19, 2017 at 09:01:57PM -0400, Peter Eisentraut wrote: >> Would you mind posting a summary of how you go here? > > There were several points here to me: > - it is necessary to solve the dependency problem (it can be solved also by adding several oid fields to the pg_type) A few oid or regproc fields in pg_type seem sensible. > - users may want to add subscripting to their existing type, which already created in their database, or drop subscripting from existing type (it cannot be done by CREATE TYPE) That's what ALTER TYPE is for. > - other type related functionalities have their CREATE command and system catalog table. For example, CREATE CAST, CREATE TRANSFORM (this is a weakest point I think, mostly because of several casts and transforms can be defined to one type, and only one subscripting can be defined to one type). The difference is that those create associations between two separate objects (cast: type1 <-> type2, transform: type <-> language). A subscripting is just a property of a type. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers