Commit c92f7c62 authored by Noah Misch's avatar Noah Misch

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).
parent 52f3a9d6
...@@ -1010,13 +1010,12 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl ...@@ -1010,13 +1010,12 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
-- complain if script is sourced in psql, rather than via CREATE EXTENSION -- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pair" to load this file. \quit \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;'; RETURNS pair LANGUAGE SQL AS 'SELECT ROW($1, $2)::@extschema@.pair;';
CREATE OPERATOR ~> (LEFTARG = pg_catalog.text, CREATE OPERATOR ~> (LEFTARG = text, RIGHTARG = text, PROCEDURE = pair);
RIGHTARG = pg_catalog.text, PROCEDURE = pair);
-- "SET search_path" is easy to get right, but qualified names perform better. -- "SET search_path" is easy to get right, but qualified names perform better.
CREATE OR REPLACE FUNCTION lower(pair) CREATE OR REPLACE FUNCTION lower(pair)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment