Fix typos in some error messages thrown by extension scripts when fed to psql.

Some of the many error messages introduced in 458857cc missed 'FROM
unpackaged'. Also e016b724 and 45ffeb7e forgot to quote extension
version numbers.

Backpatch to 9.1, just like 458857cc which introduced the messages. Do
so because the error messages thrown when the wrong command is copy &
pasted aren't easy to understand.
This commit is contained in:
Andres Freund 2014-08-25 18:30:37 +02:00
parent 3cd934f635
commit d153b80161
39 changed files with 39 additions and 39 deletions

View File

@ -1,7 +1,7 @@
/* contrib/btree_gin/btree_gin--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION btree_gin" to load this file. \quit
\echo Use "CREATE EXTENSION btree_gin FROM unpackaged" to load this file. \quit
ALTER EXTENSION btree_gin ADD function gin_btree_consistent(internal,smallint,anyelement,integer,internal,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_value_int2(smallint,internal);

View File

@ -1,7 +1,7 @@
/* contrib/btree_gist/btree_gist--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION btree_gist" to load this file. \quit
\echo Use "CREATE EXTENSION btree_gist FROM unpackaged" to load this file. \quit
ALTER EXTENSION btree_gist ADD type gbtreekey4;
ALTER EXTENSION btree_gist ADD function gbtreekey4_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/chkpass/chkpass--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION chkpass" to load this file. \quit
\echo Use "CREATE EXTENSION chkpass FROM unpackaged" to load this file. \quit
ALTER EXTENSION chkpass ADD type chkpass;
ALTER EXTENSION chkpass ADD function chkpass_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/citext/citext--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION citext" to load this file. \quit
\echo Use "CREATE EXTENSION citext FROM unpackaged" to load this file. \quit
ALTER EXTENSION citext ADD type citext;
ALTER EXTENSION citext ADD function citextin(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/cube/cube--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION cube" to load this file. \quit
\echo Use "CREATE EXTENSION cube FROM unpackaged" to load this file. \quit
ALTER EXTENSION cube ADD type cube;
ALTER EXTENSION cube ADD function cube_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/dblink/dblink--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION dblink" to load this file. \quit
\echo Use "CREATE EXTENSION dblink FROM unpackaged" to load this file. \quit
ALTER EXTENSION dblink ADD function dblink_connect(text);
ALTER EXTENSION dblink ADD function dblink_connect(text,text);

View File

@ -1,7 +1,7 @@
/* contrib/dict_int/dict_int--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION dict_int" to load this file. \quit
\echo Use "CREATE EXTENSION dict_int FROM unpackaged" to load this file. \quit
ALTER EXTENSION dict_int ADD function dintdict_init(internal);
ALTER EXTENSION dict_int ADD function dintdict_lexize(internal,internal,internal,internal);

View File

@ -1,7 +1,7 @@
/* contrib/dict_xsyn/dict_xsyn--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION dict_xsyn" to load this file. \quit
\echo Use "CREATE EXTENSION dict_xsyn FROM unpackaged" to load this file. \quit
ALTER EXTENSION dict_xsyn ADD function dxsyn_init(internal);
ALTER EXTENSION dict_xsyn ADD function dxsyn_lexize(internal,internal,internal,internal);

View File

@ -1,7 +1,7 @@
/* contrib/earthdistance/earthdistance--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION earthdistance" to load this file. \quit
\echo Use "CREATE EXTENSION earthdistance FROM unpackaged" to load this file. \quit
ALTER EXTENSION earthdistance ADD function earth();
ALTER EXTENSION earthdistance ADD type earth;

View File

@ -1,7 +1,7 @@
/* contrib/fuzzystrmatch/fuzzystrmatch--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION fuzzystrmatch" to load this file. \quit
\echo Use "CREATE EXTENSION fuzzystrmatch FROM unpackaged" to load this file. \quit
ALTER EXTENSION fuzzystrmatch ADD function levenshtein(text,text);
ALTER EXTENSION fuzzystrmatch ADD function levenshtein(text,text,integer,integer,integer);

View File

@ -1,7 +1,7 @@
/* contrib/hstore/hstore--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION hstore" to load this file. \quit
\echo Use "CREATE EXTENSION hstore FROM unpackaged" to load this file. \quit
ALTER EXTENSION hstore ADD type hstore;
ALTER EXTENSION hstore ADD function hstore_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/intagg/intagg--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION intagg" to load this file. \quit
\echo Use "CREATE EXTENSION intagg FROM unpackaged" to load this file. \quit
ALTER EXTENSION intagg ADD function int_agg_state(internal,integer);
ALTER EXTENSION intagg ADD function int_agg_final_array(internal);

View File

@ -1,7 +1,7 @@
/* contrib/intarray/intarray--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION intarray" to load this file. \quit
\echo Use "CREATE EXTENSION intarray FROM unpackaged" to load this file. \quit
ALTER EXTENSION intarray ADD type query_int;
ALTER EXTENSION intarray ADD function bqarr_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/isn/isn--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION isn" to load this file. \quit
\echo Use "CREATE EXTENSION isn FROM unpackaged" to load this file. \quit
ALTER EXTENSION isn ADD type ean13;
ALTER EXTENSION isn ADD function ean13_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/lo/lo--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION lo" to load this file. \quit
\echo Use "CREATE EXTENSION lo FROM unpackaged" to load this file. \quit
ALTER EXTENSION lo ADD domain lo;
ALTER EXTENSION lo ADD function lo_oid(lo);

View File

@ -1,7 +1,7 @@
/* contrib/ltree/ltree--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION ltree" to load this file. \quit
\echo Use "CREATE EXTENSION ltree FROM unpackaged" to load this file. \quit
ALTER EXTENSION ltree ADD type ltree;
ALTER EXTENSION ltree ADD function ltree_in(cstring);

View File

@ -1,7 +1,7 @@
/* contrib/pageinspect/pageinspect--1.0--1.1.sql */
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
\echo Use "ALTER EXTENSION pageinspect UPDATE TO 1.1" to load this file. \quit
\echo Use "ALTER EXTENSION pageinspect UPDATE TO '1.1'" to load this file. \quit
DROP FUNCTION page_header(bytea);
CREATE FUNCTION page_header(IN page bytea,

View File

@ -1,7 +1,7 @@
/* contrib/pageinspect/pageinspect--1.1--1.2.sql */
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
\echo Use "ALTER EXTENSION pageinspect UPDATE TO 1.2" to load this file. \quit
\echo Use "ALTER EXTENSION pageinspect UPDATE TO '1.2'" to load this file. \quit
DROP FUNCTION page_header(bytea);
CREATE FUNCTION page_header(IN page bytea,

View File

@ -1,7 +1,7 @@
/* contrib/pageinspect/pageinspect--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pageinspect" to load this file. \quit
\echo Use "CREATE EXTENSION pageinspect FROM unpackaged" to load this file. \quit
DROP FUNCTION heap_page_items(bytea);
CREATE FUNCTION heap_page_items(IN page bytea,

View File

@ -1,7 +1,7 @@
/* contrib/pg_buffercache/pg_buffercache--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_buffercache" to load this file. \quit
\echo Use "CREATE EXTENSION pg_buffercache FROM unpackaged" to load this file. \quit
ALTER EXTENSION pg_buffercache ADD function pg_buffercache_pages();
ALTER EXTENSION pg_buffercache ADD view pg_buffercache;

View File

@ -1,7 +1,7 @@
/* contrib/pg_freespacemap/pg_freespacemap--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_freespacemap" to load this file. \quit
\echo Use "CREATE EXTENSION pg_freespacemap FROM unpackaged" to load this file. \quit
ALTER EXTENSION pg_freespacemap ADD function pg_freespace(regclass,bigint);
ALTER EXTENSION pg_freespacemap ADD function pg_freespace(regclass);

View File

@ -1,7 +1,7 @@
/* contrib/pg_stat_statements/pg_stat_statements--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_stat_statements" to load this file. \quit
\echo Use "CREATE EXTENSION pg_stat_statements FROM unpackaged" to load this file. \quit
ALTER EXTENSION pg_stat_statements ADD function pg_stat_statements_reset();
ALTER EXTENSION pg_stat_statements ADD function pg_stat_statements();

View File

@ -1,7 +1,7 @@
/* contrib/pg_trgm/pg_trgm--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_trgm" to load this file. \quit
\echo Use "CREATE EXTENSION pg_trgm FROM unpackaged" to load this file. \quit
ALTER EXTENSION pg_trgm ADD function set_limit(real);
ALTER EXTENSION pg_trgm ADD function show_limit();

View File

@ -1,7 +1,7 @@
/* contrib/pgcrypto/pgcrypto--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgcrypto" to load this file. \quit
\echo Use "CREATE EXTENSION pgcrypto FROM unpackaged" to load this file. \quit
ALTER EXTENSION pgcrypto ADD function digest(text,text);
ALTER EXTENSION pgcrypto ADD function digest(bytea,text);

View File

@ -1,6 +1,6 @@
/* contrib/pgrowlocks/pgrowlocks--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgrowlocks" to load this file. \quit
\echo Use "CREATE EXTENSION pgrowlocks FROM unpackaged" to load this file. \quit
ALTER EXTENSION pgrowlocks ADD function pgrowlocks(text);

View File

@ -1,7 +1,7 @@
/* contrib/pgstattuple/pgstattuple--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgstattuple" to load this file. \quit
\echo Use "CREATE EXTENSION pgstattuple FROM unpackaged" to load this file. \quit
ALTER EXTENSION pgstattuple ADD function pgstattuple(text);
ALTER EXTENSION pgstattuple ADD function pgstattuple(oid);

View File

@ -1,7 +1,7 @@
/* contrib/seg/seg--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION seg" to load this file. \quit
\echo Use "CREATE EXTENSION seg FROM unpackaged" to load this file. \quit
ALTER EXTENSION seg ADD type seg;
ALTER EXTENSION seg ADD function seg_in(cstring);

View File

@ -1,6 +1,6 @@
/* contrib/spi/autoinc--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION autoinc" to load this file. \quit
\echo Use "CREATE EXTENSION autoinc FROM unpackaged" to load this file. \quit
ALTER EXTENSION autoinc ADD function autoinc();

View File

@ -1,6 +1,6 @@
/* contrib/spi/insert_username--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION insert_username" to load this file. \quit
\echo Use "CREATE EXTENSION insert_username FROM unpackaged" to load this file. \quit
ALTER EXTENSION insert_username ADD function insert_username();

View File

@ -1,6 +1,6 @@
/* contrib/spi/moddatetime--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION moddatetime" to load this file. \quit
\echo Use "CREATE EXTENSION moddatetime FROM unpackaged" to load this file. \quit
ALTER EXTENSION moddatetime ADD function moddatetime();

View File

@ -1,7 +1,7 @@
/* contrib/spi/refint--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION refint" to load this file. \quit
\echo Use "CREATE EXTENSION refint FROM unpackaged" to load this file. \quit
ALTER EXTENSION refint ADD function check_primary_key();
ALTER EXTENSION refint ADD function check_foreign_key();

View File

@ -1,7 +1,7 @@
/* contrib/spi/timetravel--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION timetravel" to load this file. \quit
\echo Use "CREATE EXTENSION timetravel FROM unpackaged" to load this file. \quit
ALTER EXTENSION timetravel ADD function timetravel();
ALTER EXTENSION timetravel ADD function set_timetravel(name,integer);

View File

@ -1,7 +1,7 @@
/* contrib/sslinfo/sslinfo--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION sslinfo" to load this file. \quit
\echo Use "CREATE EXTENSION sslinfo FROM unpackaged" to load this file. \quit
ALTER EXTENSION sslinfo ADD function ssl_client_serial();
ALTER EXTENSION sslinfo ADD function ssl_is_used();

View File

@ -1,7 +1,7 @@
/* contrib/tablefunc/tablefunc--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION tablefunc" to load this file. \quit
\echo Use "CREATE EXTENSION tablefunc FROM unpackaged" to load this file. \quit
ALTER EXTENSION tablefunc ADD function normal_rand(integer,double precision,double precision);
ALTER EXTENSION tablefunc ADD function crosstab(text);

View File

@ -1,7 +1,7 @@
/* contrib/test_parser/test_parser--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION test_parser" to load this file. \quit
\echo Use "CREATE EXTENSION test_parser FROM unpackaged" to load this file. \quit
ALTER EXTENSION test_parser ADD function testprs_start(internal,integer);
ALTER EXTENSION test_parser ADD function testprs_getlexeme(internal,internal,internal);

View File

@ -1,7 +1,7 @@
/* contrib/tsearch2/tsearch2--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION tsearch2" to load this file. \quit
\echo Use "CREATE EXTENSION tsearch2 FROM unpackaged" to load this file. \quit
ALTER EXTENSION tsearch2 ADD type @extschema@.tsvector;
ALTER EXTENSION tsearch2 ADD type @extschema@.tsquery;

View File

@ -1,7 +1,7 @@
/* contrib/unaccent/unaccent--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION unaccent" to load this file. \quit
\echo Use "CREATE EXTENSION unaccent FROM unpackaged" to load this file. \quit
ALTER EXTENSION unaccent ADD function unaccent(regdictionary,text);
ALTER EXTENSION unaccent ADD function unaccent(text);

View File

@ -1,7 +1,7 @@
/* contrib/uuid-ossp/uuid-ossp--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use '''CREATE EXTENSION "uuid-ossp"''' to load this file. \quit
\echo Use '''CREATE EXTENSION "uuid-ossp" FROM unpackaged''' to load this file. \quit
ALTER EXTENSION "uuid-ossp" ADD function uuid_nil();
ALTER EXTENSION "uuid-ossp" ADD function uuid_ns_dns();

View File

@ -1,7 +1,7 @@
/* contrib/xml2/xml2--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION xml2" to load this file. \quit
\echo Use "CREATE EXTENSION xml2 FROM unpackaged" to load this file. \quit
ALTER EXTENSION xml2 ADD function xslt_process(text,text);
ALTER EXTENSION xml2 ADD function xslt_process(text,text,text);