1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit
----
-- Fix privileges on schema dedicated to the global temporary table
----
REVOKE ALL ON SCHEMA @extschema@ FROM PUBLIC;
GRANT USAGE ON SCHEMA @extschema@ TO PUBLIC;
----
-- Table used to store information about Global Temporary Tables.
-- Content will be loaded in memory by the pgtt extension.
----
CREATE TABLE @extschema@.pg_global_temp_tables (
relid integer NOT NULL,
nspname name NOT NULL,
relname name NOT NULL,
preserved boolean,
code text,
UNIQUE (nspname, relname)
);
GRANT ALL ON TABLE @extschema@.pg_global_temp_tables TO PUBLIC;
-- Include tables into pg_dump
SELECT pg_catalog.pg_extension_config_dump('pg_global_temp_tables', '');
|