From: Tom Lane <tgl@sss.pgh.pa.us>
To: Karen Huddleston <khuddleston@pivotal.io>
Cc: pgsql-bugs@postgreSQL.org
Subject: Re: BUG #14706: Dependencies not recorded properly for base types
Date: Wed, 14 Jun 2017 21:02:28 -0400
Message-ID: <23630.1497488548@sss.pgh.pa.us> (raw)
In-Reply-To: <CADewMCny3SSoUsWnXAT9sV=B2mj4HTY6gVCWgvm1AD35eg-LJA@mail.gmail.com>
References: <20170614232259.1424.82774@wrigleys.postgresql.org>
<22824.1497487336@sss.pgh.pa.us>
<CADewMCny3SSoUsWnXAT9sV=B2mj4HTY6gVCWgvm1AD35eg-LJA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Karen Huddleston <khuddleston@pivotal.io> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, khuddleston@pivotal.io
Subject: Re: BUG #14706: Dependencies not recorded properly for base types
In-Reply-To: <23630.1497488548@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox