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