Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XvSqo-0001yq-AX for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Dec 2014 15:25:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XvSqn-00021d-Q1 for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Dec 2014 15:25:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XvExH-00064h-1x for pgsql-bugs@postgresql.org; Mon, 01 Dec 2014 00:35:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XvExC-00079S-P3 for pgsql-bugs@postgresql.org; Mon, 01 Dec 2014 00:35:05 +0000 MIME-Version: 1.0 Subject: BUG #12108: Documentation: Limitation of shell types not mentioned To: pgsql-bugs@postgresql.org From: bouda@edookit.com Date: Mon, 01 Dec 2014 00:34:48 +0000 Message-ID: <20141201003448.2567.45700@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 12108 Logged by: Ondřej Bouda Email address: bouda@edookit.com PostgreSQL version: 9.3.5 Operating system: Windows 7 Description: According to an older discussion [1], shell types may only be used by functions implemented in C. Indeed, in current versions, functions in, e.g., SQL or PL/pgSQL cannot be defined if an argument type or the return type is just a shell type. This is not mentioned in the documentation, however. On the contrary, the CREATE TYPE documentation suggests creating a shell type as the "tricky" way to define a range type with a canonical function. Neither CREATE FUNCTION documentation mentions such a limitation. Thus, when implementing an SQL or PL/pgSQL prototype for some new canonical function, one gets stuck on an unexpected error. I suggest mentioning the limitation on the CREATE TYPE page, in the paragraph saying how to specify the canonical function. Regards, Ondřej Bouda [1] http://postgresql.nabble.com/Chicken-egg-problem-with-range-types-td5717030.html -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs