Skip to content

Commit 6c1c7f2

Browse files
author
Gilles Darold
committed
Update version to 1.3 and add upgrade/downgrade files
1 parent 0e13898 commit 6c1c7f2

12 files changed

+140
-7
lines changed

META.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pgtt",
33
"abstract": "Extension to add Global Temporary Tables feature to PostgreSQL",
44
"description": "pgtt is a PostgreSQL extension to add Oracle-style Global Temporary Tables feature. It is based on unlogged table, partitioning and views.",
5-
"version": "2.2.0",
5+
"version": "2.3.0",
66
"maintainer": "Gilles Darold <gilles@darold.net>",
77
"license": {
88
"PostgreSQL": "http://www.postgresql.org/about/licence"
@@ -17,14 +17,14 @@
1717
},
1818
"provides": {
1919
"pgtt": {
20-
"file": "sql/pgtt--2.2.0.sql",
20+
"file": "sql/pgtt--2.3.0.sql",
2121
"docfile": "doc/pgtt.md",
22-
"version": "2.2.0",
22+
"version": "2.3.0",
2323
"abstract": "Extension to manage Global Temporary Tables"
2424
}
2525
},
2626
"meta-spec": {
27-
"version": "2.2.0",
27+
"version": "2.3.0",
2828
"url": "http://pgxn.org/meta/spec.txt"
2929
},
3030
"tags": [

pgtt.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
default_version = '2.2.0'
1+
default_version = '2.3.0'
22
comment = 'Extension to add Global Temporary Tables feature to PostgreSQL'
33
module_pathname = '$libdir/pgtt'
44
schema = 'pgtt_schema'

sql/pgtt--2.0.0.sql

100755100644
File mode changed.

sql/pgtt--2.1.0.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

sql/pgtt--2.1.0.sql

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

sql/pgtt--2.2.0.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

sql/pgtt--2.2.0.sql

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

sql/pgtt--2.3.0.sql

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

updates/pgtt--2.0.0--2.1.0.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
2+
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit
3+
4+
-- check the functions bodies as creation time, enabled by default
5+
SET LOCAL check_function_bodies = on ;
6+
7+
-- make sure of client encoding
8+
SET LOCAL client_encoding = 'UTF8';
9+

updates/pgtt--2.1.0--2.0.0.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
2+
\echo Use "CREATE EXTENSION pgtt" to load this file. \quit
3+
4+
-- check the functions bodies as creation time, enabled by default
5+
SET LOCAL check_function_bodies = on ;
6+
7+
-- make sure of client encoding
8+
SET LOCAL client_encoding = 'UTF8';
9+

0 commit comments

Comments
 (0)