Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLJBF-0001Wv-RG for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jun 2017 01:02:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLJBE-0000JQ-VC for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jun 2017 01:02: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 1dLJBD-0000In-7f for pgsql-bugs@postgreSQL.org; Thu, 15 Jun 2017 01:02:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLJBA-00037l-BM for pgsql-bugs@postgreSQL.org; Thu, 15 Jun 2017 01:02:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v5F12ScZ023631; Wed, 14 Jun 2017 21:02:28 -0400 From: Tom Lane To: Karen Huddleston cc: pgsql-bugs@postgreSQL.org Subject: Re: BUG #14706: Dependencies not recorded properly for base types In-reply-to: References: <20170614232259.1424.82774@wrigleys.postgresql.org> <22824.1497487336@sss.pgh.pa.us> Comments: In-reply-to Karen Huddleston message dated "Wed, 14 Jun 2017 17:50:50 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23629.1497488548.1@sss.pgh.pa.us> Date: Wed, 14 Jun 2017 21:02:28 -0400 Message-ID: <23630.1497488548@sss.pgh.pa.us> 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 Karen Huddleston writes: > I didn't actually realize it was deprecated style. I'm not super familiar > with the syntax for creating types and functions. Which part is deprecated > and what should it be instead? The way you're supposed to make a new type nowadays is CREATE TYPE base_type; -- make a shell type CREATE FUNCTION base_fn_in(cstring) returns base_type as ... CREATE FUNCTION base_fn_out(base_type) returns cstring as ... -- convert shell to real type CREATE TYPE base_type(input=base_fn_in, output=base_fn_out); In this way the function signatures are legal from the get-go, and the dependencies are right too. The business with "opaque" as a placeholder has been deprecated for circa 15 years; did you find that example in any modern documentation? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs