8000 Don't qualify type pg_catalog.text in extend-extensions-example. · tomdcc/postgres@9dbcbd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9dbcbd1

Browse files
committed
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).
1 parent 3bd5009 commit 9dbcbd1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/src/sgml/extend.sgml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,13 +884,12 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>');
884884
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
885885
\echo Use "CREATE EXTENSION pair" to load this file. \quit
886886

887-
CREATE TYPE pair AS ( k pg_catalog.text, v pg_catalog.text );
887+
CREATE TYPE pair AS ( k text, v text );
888888

889-
CREATE OR REPLACE FUNCTION pair(pg_catalog.text, pg_catalog.text)
889+
CREATE OR REPLACE FUNCTION pair(text, text)
890890
RETURNS pair LANGUAGE SQL AS 'SELECT ROW($1, $2)::@extschema@.pair;';
891891

892-
CREATE OPERATOR ~> (LEFTARG = pg_catalog.text,
893-
RIGHTARG = pg_catalog.text, PROCEDURE = pair);
892+
CREATE OPERATOR ~> (LEFTARG = text, RIGHTARG = text, PROCEDURE = pair);
894893

895894
-- "SET search_path" is easy to get right, but qualified names perform better.
896895
CREATE OR REPLACE FUNCTION lower(pair)

0 commit comments

Comments
 (0)
0