From: Noah Misch Date: Sat, 24 Mar 2018 03:31:03 +0000 (-0700) Subject: Don't qualify type pg_catalog.text in extend-extensions-example. X-Git-Tag: REL9_6_9~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c8974e6a02d24be3543741f9bf6ceab384b30d6;p=postgresql 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 of this already omitted them. Back-patch to 9.3 (all supported versions). --- diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 7b6b18c2fe..87248f0cf0 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -928,13 +928,12 @@ SELECT * FROM pg_extension_update_paths('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)