Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtLEa-0004pJ-4w for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Sep 2017 22:06:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dtLEZ-00021f-9n for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Sep 2017 22:06:43 +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 1dtLD0-0007eI-9X for pgsql-hackers@postgresql.org; Sat, 16 Sep 2017 22:05:06 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtLCw-0003nG-MX for pgsql-hackers@postgresql.org; Sat, 16 Sep 2017 22:05:05 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id DA42E21C1D04; Sun, 17 Sep 2017 01:04:59 +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 EDD9D21C1CC3; Sun, 17 Sep 2017 01:04:58 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1505599499; bh=+KgG0nR4PYe/L+DPmy4sWJMrVIr9oyZkO3l+g5aT3qw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=JTPnAzIpgeSlAr0AwqwODS4Z50na8JD6t/RGHZWHzgMDCWJ/nR7LESzaAa8jIRnra 1cNIoYcwq7ocIXOAPEy/BQfpQQVaFQOqdHp3cIwf+KhzajKB+5uGzIg5l/n8JANFqY FWi6HpYHS8swJbTMojsTK2amHZSHVPZzAot/8k60= Date: Sun, 17 Sep 2017 01:04:55 +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: <20170916220454.GA15505@arthur.localdomain> References: <20170909213349.GA17898@arthur.localdomain> <4675.1505164755@sss.pgh.pa.us> <5907.1505166328@sss.pgh.pa.us> 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 Fri, Sep 15, 2017 at 10:02:00PM +0200, Dmitry Dolgov wrote: > > So, I've implemented a patch for that in form of a `DEPENDS ON` syntax for > creating a function. In my opinion, 'DEPENDS ON' syntax is not actually appropriate here. It also looks like a not very good hack to me. Moreover user can implement subscripting to its own type without using 'DEPENDS ON' syntax. And he will face the bug mentioned above too. -- 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