Skip to content

Commit

Permalink
Update version to 1.3 and add upgrade/downgrade files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Darold committed Apr 1, 2021
1 parent 0e13898 commit 6c1c7f2
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 7 deletions.
8 changes: 4 additions & 4 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pgtt",
"abstract": "Extension to add Global Temporary Tables feature to PostgreSQL",
"description": "pgtt is a PostgreSQL extension to add Oracle-style Global Temporary Tables feature. It is based on unlogged table, partitioning and views.",
"version": "2.2.0",
"version": "2.3.0",
"maintainer": "Gilles Darold <[email protected]>",
"license": {
"PostgreSQL": "http://www.postgresql.org/about/licence"
Expand All @@ -17,14 +17,14 @@
},
"provides": {
"pgtt": {
"file": "sql/pgtt--2.2.0.sql",
"file": "sql/pgtt--2.3.0.sql",
"docfile": "doc/pgtt.md",
"version": "2.2.0",
"version": "2.3.0",
"abstract": "Extension to manage Global Temporary Tables"
}
},
"meta-spec": {
"version": "2.2.0",
"version": "2.3.0",
"url": "http://pgxn.org/meta/spec.txt"
},
"tags": [
Expand Down
2 changes: 1 addition & 1 deletion pgtt.control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default_version = '2.2.0'
default_version = '2.3.0'
comment = 'Extension to add Global Temporary Tables feature to PostgreSQL'
module_pathname = '$libdir/pgtt'
schema = 'pgtt_schema'
Expand Down
Empty file modified sql/pgtt--2.0.0.sql
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion sql/pgtt--2.1.0.sql

This file was deleted.

27 changes: 27 additions & 0 deletions sql/pgtt--2.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

----
-- Create schema dedicated to the global temporary table
----
CREATE SCHEMA IF NOT EXISTS @extschema@;
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 @[email protected]_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 @[email protected]_global_temp_tables TO PUBLIC;

-- Include tables into pg_dump
SELECT pg_catalog.pg_extension_config_dump('pg_global_temp_tables', '');

1 change: 0 additions & 1 deletion sql/pgtt--2.2.0.sql

This file was deleted.

27 changes: 27 additions & 0 deletions sql/pgtt--2.2.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

----
-- Create schema dedicated to the global temporary table
----
CREATE SCHEMA IF NOT EXISTS @extschema@;
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 @[email protected]_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 @[email protected]_global_temp_tables TO PUBLIC;

-- Include tables into pg_dump
SELECT pg_catalog.pg_extension_config_dump('pg_global_temp_tables', '');

27 changes: 27 additions & 0 deletions sql/pgtt--2.3.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

----
-- Create schema dedicated to the global temporary table
----
CREATE SCHEMA IF NOT EXISTS @extschema@;
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 @[email protected]_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 @[email protected]_global_temp_tables TO PUBLIC;

-- Include tables into pg_dump
SELECT pg_catalog.pg_extension_config_dump('pg_global_temp_tables', '');

9 changes: 9 additions & 0 deletions updates/pgtt--2.0.0--2.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

-- check the functions bodies as creation time, enabled by default
SET LOCAL check_function_bodies = on ;

-- make sure of client encoding
SET LOCAL client_encoding = 'UTF8';

9 changes: 9 additions & 0 deletions updates/pgtt--2.1.0--2.0.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

-- check the functions bodies as creation time, enabled by default
SET LOCAL check_function_bodies = on ;

-- make sure of client encoding
SET LOCAL client_encoding = 'UTF8';

9 changes: 9 additions & 0 deletions updates/pgtt--2.1.0--2.2.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

-- check the functions bodies as creation time, enabled by default
SET LOCAL check_function_bodies = on ;

-- make sure of client encoding
SET LOCAL client_encoding = 'UTF8';

9 changes: 9 additions & 0 deletions updates/pgtt--2.2.0--2.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

-- check the functions bodies as creation time, enabled by default
SET LOCAL check_function_bodies = on ;

-- make sure of client encoding
SET LOCAL client_encoding = 'UTF8';

9 changes: 9 additions & 0 deletions updates/pgtt--2.2.0--2.3.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

-- check the functions bodies as creation time, enabled by default
SET LOCAL check_function_bodies = on ;

-- make sure of client encoding
SET LOCAL client_encoding = 'UTF8';

9 changes: 9 additions & 0 deletions updates/pgtt--2.3.0--2.2.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit

-- check the functions bodies as creation time, enabled by default
SET LOCAL check_function_bodies = on ;

-- make sure of client encoding
SET LOCAL client_encoding = 'UTF8';

0 comments on commit 6c1c7f2

Please sign in to comment.