postgresql/contrib/hstore/hstore--unpackaged--1.0.sql
Tom Lane 458857cc9d Throw a useful error message if an extension script file is fed to psql.
We have seen one too many reports of people trying to use 9.1 extension
files in the old-fashioned way of sourcing them in psql.  Not only does
that usually not work (due to failure to substitute for MODULE_PATHNAME
and/or @extschema@), but if it did work they'd get a collection of loose
objects not an extension.  To prevent this, insert an \echo ... \quit
line that prints a suitable error message into each extension script file,
and teach commands/extension.c to ignore lines starting with \echo.
That should not only prevent any adverse consequences of loading a script
file the wrong way, but make it crystal clear to users that they need to
do it differently now.

Tom Lane, following an idea of Andrew Dunstan's.  Back-patch into 9.1
... there is not going to be much value in this if we wait till 9.2.
2011-10-12 15:45:03 -04:00

93 lines
5.4 KiB
SQL

/* 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
ALTER EXTENSION hstore ADD type hstore;
ALTER EXTENSION hstore ADD function hstore_in(cstring);
ALTER EXTENSION hstore ADD function hstore_out(hstore);
ALTER EXTENSION hstore ADD function hstore_recv(internal);
ALTER EXTENSION hstore ADD function hstore_send(hstore);
ALTER EXTENSION hstore ADD function hstore_version_diag(hstore);
ALTER EXTENSION hstore ADD function fetchval(hstore,text);
ALTER EXTENSION hstore ADD operator ->(hstore,text);
ALTER EXTENSION hstore ADD function slice_array(hstore,text[]);
ALTER EXTENSION hstore ADD operator ->(hstore,text[]);
ALTER EXTENSION hstore ADD function slice(hstore,text[]);
ALTER EXTENSION hstore ADD function isexists(hstore,text);
ALTER EXTENSION hstore ADD function exist(hstore,text);
ALTER EXTENSION hstore ADD operator ?(hstore,text);
ALTER EXTENSION hstore ADD function exists_any(hstore,text[]);
ALTER EXTENSION hstore ADD operator ?|(hstore,text[]);
ALTER EXTENSION hstore ADD function exists_all(hstore,text[]);
ALTER EXTENSION hstore ADD operator ?&(hstore,text[]);
ALTER EXTENSION hstore ADD function isdefined(hstore,text);
ALTER EXTENSION hstore ADD function defined(hstore,text);
ALTER EXTENSION hstore ADD function delete(hstore,text);
ALTER EXTENSION hstore ADD function delete(hstore,text[]);
ALTER EXTENSION hstore ADD function delete(hstore,hstore);
ALTER EXTENSION hstore ADD operator -(hstore,text);
ALTER EXTENSION hstore ADD operator -(hstore,text[]);
ALTER EXTENSION hstore ADD operator -(hstore,hstore);
ALTER EXTENSION hstore ADD function hs_concat(hstore,hstore);
ALTER EXTENSION hstore ADD operator ||(hstore,hstore);
ALTER EXTENSION hstore ADD function hs_contains(hstore,hstore);
ALTER EXTENSION hstore ADD function hs_contained(hstore,hstore);
ALTER EXTENSION hstore ADD operator <@(hstore,hstore);
ALTER EXTENSION hstore ADD operator @>(hstore,hstore);
ALTER EXTENSION hstore ADD operator ~(hstore,hstore);
ALTER EXTENSION hstore ADD operator @(hstore,hstore);
ALTER EXTENSION hstore ADD function tconvert(text,text);
ALTER EXTENSION hstore ADD function hstore(text,text);
ALTER EXTENSION hstore ADD operator =>(text,text);
ALTER EXTENSION hstore ADD function hstore(text[],text[]);
ALTER EXTENSION hstore ADD function hstore(text[]);
ALTER EXTENSION hstore ADD cast (text[] as hstore);
ALTER EXTENSION hstore ADD function hstore(record);
ALTER EXTENSION hstore ADD function hstore_to_array(hstore);
ALTER EXTENSION hstore ADD operator %%(NONE,hstore);
ALTER EXTENSION hstore ADD function hstore_to_matrix(hstore);
ALTER EXTENSION hstore ADD operator %#(NONE,hstore);
ALTER EXTENSION hstore ADD function akeys(hstore);
ALTER EXTENSION hstore ADD function avals(hstore);
ALTER EXTENSION hstore ADD function skeys(hstore);
ALTER EXTENSION hstore ADD function svals(hstore);
ALTER EXTENSION hstore ADD function each(hstore);
ALTER EXTENSION hstore ADD function populate_record(anyelement,hstore);
ALTER EXTENSION hstore ADD operator #=(anyelement,hstore);
ALTER EXTENSION hstore ADD function hstore_eq(hstore,hstore);
ALTER EXTENSION hstore ADD function hstore_ne(hstore,hstore);
ALTER EXTENSION hstore ADD function hstore_gt(hstore,hstore);
ALTER EXTENSION hstore ADD function hstore_ge(hstore,hstore);
ALTER EXTENSION hstore ADD function hstore_lt(hstore,hstore);
ALTER EXTENSION hstore ADD function hstore_le(hstore,hstore);
ALTER EXTENSION hstore ADD function hstore_cmp(hstore,hstore);
ALTER EXTENSION hstore ADD operator <>(hstore,hstore);
ALTER EXTENSION hstore ADD operator =(hstore,hstore);
ALTER EXTENSION hstore ADD operator #>#(hstore,hstore);
ALTER EXTENSION hstore ADD operator #>=#(hstore,hstore);
ALTER EXTENSION hstore ADD operator #<#(hstore,hstore);
ALTER EXTENSION hstore ADD operator #<=#(hstore,hstore);
ALTER EXTENSION hstore ADD operator family btree_hstore_ops using btree;
ALTER EXTENSION hstore ADD operator class btree_hstore_ops using btree;
ALTER EXTENSION hstore ADD function hstore_hash(hstore);
ALTER EXTENSION hstore ADD operator family hash_hstore_ops using hash;
ALTER EXTENSION hstore ADD operator class hash_hstore_ops using hash;
ALTER EXTENSION hstore ADD type ghstore;
ALTER EXTENSION hstore ADD function ghstore_in(cstring);
ALTER EXTENSION hstore ADD function ghstore_out(ghstore);
ALTER EXTENSION hstore ADD function ghstore_compress(internal);
ALTER EXTENSION hstore ADD function ghstore_decompress(internal);
ALTER EXTENSION hstore ADD function ghstore_penalty(internal,internal,internal);
ALTER EXTENSION hstore ADD function ghstore_picksplit(internal,internal);
ALTER EXTENSION hstore ADD function ghstore_union(internal,internal);
ALTER EXTENSION hstore ADD function ghstore_same(internal,internal,internal);
ALTER EXTENSION hstore ADD function ghstore_consistent(internal,internal,integer,oid,internal);
ALTER EXTENSION hstore ADD operator family gist_hstore_ops using gist;
ALTER EXTENSION hstore ADD operator class gist_hstore_ops using gist;
ALTER EXTENSION hstore ADD function gin_extract_hstore(internal,internal);
ALTER EXTENSION hstore ADD function gin_extract_hstore_query(internal,internal,smallint,internal,internal);
ALTER EXTENSION hstore ADD function gin_consistent_hstore(internal,smallint,internal,integer,internal,internal);
ALTER EXTENSION hstore ADD operator family gin_hstore_ops using gin;
ALTER EXTENSION hstore ADD operator class gin_hstore_ops using gin;