diff options
author | Noah Misch <noah@leadboat.com> | 2018-03-23 20:31:03 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2018-03-23 20:31:06 -0700 |
commit | 6ec2a1545b4ab59bced520425ef08f87fc870f1e (patch) | |
tree | 1db426864253de61d91b3886d0fef945b2b4f921 /doc/src | |
parent | e88d41a86800d2c84844bbe9bd9e980199d64b13 (diff) |
Don't qualify type pg_catalog.text in extend-extensions-example.
Extension scripts begin execution with pg_catalog at the front of the
search path, so type names reliably refer to pg_catalog. Remove these
superfluous qualifications. Earlier <programlisting> of this <sect1>
already omitted them. Back-patch to 9.3 (all supported versions).
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/extend.sgml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 3f9f429daf7..962515c66e9 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -979,13 +979,12 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>'); -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pair" to load this file. \quit -CREATE TYPE pair AS ( k pg_catalog.text, v pg_catalog.text ); +CREATE TYPE pair AS ( k text, v text ); -CREATE OR REPLACE FUNCTION pair(pg_catalog.text, pg_catalog.text) +CREATE OR REPLACE FUNCTION pair(text, text) RETURNS pair LANGUAGE SQL AS 'SELECT ROW($1, $2)::@extschema@.pair;'; -CREATE OPERATOR ~> (LEFTARG = pg_catalog.text, - RIGHTARG = pg_catalog.text, PROCEDURE = pair); +CREATE OPERATOR ~> (LEFTARG = text, RIGHTARG = text, PROCEDURE = pair); -- "SET search_path" is easy to get right, but qualified names perform better. CREATE OR REPLACE FUNCTION lower(pair) |