Skip to content

Commit f79e19c

Browse files
committed
Update ChangeLog and version to v2.4
1 parent 4b24e4b commit f79e19c

File tree

6 files changed

+83
-8
lines changed

6 files changed

+83
-8
lines changed

ChangeLog

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
Version 2.4 - Jun 04 2021
2+
3+
This version allow use of the extension by non superuser and especially
4+
the creation and maintenance of GTT. It also fixes compatibility with
5+
PostgreSQL v14. Here is the full list of changes:
6+
7+
- Fix FailedAssertion "flags & HASH_STRINGS" with PG14. Thanks to
8+
MigOps for the patch.
9+
- Check for minimum pg version in the C code instead of Makefile.
10+
Thanks to MigOps for the patch.
11+
- Fixed compiling for PostgreSQL 14. Thanks to Dmitry Ukolov for
12+
the patch.
13+
- Fix documentation about privilege to set on pgtt_schema for a
14+
non superuser role.
15+
- Allow creation and maintenance of Global Temporary Tables by non
16+
superuser. This require that the user can use schema pgtt_schema
17+
and can write to table pg_schema.pg_global_temp_tables.
18+
- The library can now be loaded by the user using:
19+
LOAD '$libdir/plugins/pgtt.so';
20+
Thanks to Dmitry Ukolov for the feature request.
21+
- Fix two crashes when --enable-cassert is used. Thanks to hanson69
22+
for the report.
23+
- Fix comment and index on PGTT table. Thanks to Dmitry Ukolov for
24+
the report.
25+
- Fix unexpected error "attempt to create referential integrity
26+
constraint on global temporary table" when creating a regular
27+
table and fix detection of FK and throw an error on create global
28+
temporary table statement. Thanks to Dmitry Ukolov for the report.
29+
- Fix impossibility to recreate GTT if it was dropped in another
30+
session. Thanks to Dmitry Ukolov for the report.
31+
- Remove useless extension's downgrade files. Thanks to MigOps
32+
for the patch.
33+
34+
135
Version 2.3 - Apr 02 2021
236

337
This version fix the compatibility with PostgreSQL 10 and 11.

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.3.0",
5+
"version": "2.4.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.3.0.sql",
20+
"file": "sql/pgtt--2.4.0.sql",
2121
"docfile": "doc/pgtt.md",
22-
"version": "2.3.0",
22+
"version": "2.4.0",
2323
"abstract": "Extension to manage Global Temporary Tables"
2424
}
2525
},
2626
"meta-spec": {
27-
"version": "2.3.0",
27+
"version": "2.4.0",
2828
"url": "http://pgxn.org/meta/spec.txt"
2929
},
3030
"tags": [

pgtt.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
#include "catalog/pg_class.h"
7474
#endif
7575

76-
#if PG_VERSION_NUM < 90400
77-
#error Minimum version of PostgreSQL required is 9.4
76+
#if PG_VERSION_NUM < 90500
77+
#error Minimum version of PostgreSQL required is 9.5
7878
#endif
7979

8080
#define CATALOG_GLOBAL_TEMP_REL "pg_global_temp_tables"
@@ -1243,7 +1243,12 @@ EnableGttManager(void)
12431243
GttHashTable = hash_create("Global Temporary Table hash list",
12441244
GTT_PER_DATABASE,
12451245
&ctl,
1246-
HASH_STRINGS | HASH_ELEM | HASH_CONTEXT);
1246+
#if PG_VERSION_NUM >= 140000
1247+
HASH_STRINGS | HASH_ELEM | HASH_CONTEXT
1248+
#else
1249+
HASH_ELEM | HASH_CONTEXT
1250+
#endif
1251+
);
12471252
elog(DEBUG1, "GTT cache initialized.");
12481253
}
12491254

pgtt.control

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

sql/pgtt--2.4.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.3.0--2.4.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)