From 8311d1d40294865a419b9bd0950c3cd642744e28 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 1 Jan 2022 16:46:54 -0600 Subject: [PATCH 06/11] f!0004-gtt-v64-regress.patch --- src/test/regress/expected/global_temporary_table.out | 12 ++++++------ src/test/regress/sql/global_temporary_table.sql | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/regress/expected/global_temporary_table.out b/src/test/regress/expected/global_temporary_table.out index 2ada5fa6b9..0aeb53d46d 100644 --- a/src/test/regress/expected/global_temporary_table.out +++ b/src/test/regress/expected/global_temporary_table.out @@ -1,5 +1,5 @@ -- --- GLobal emparary table test case +-- Global temporary table test case -- CREATE SCHEMA IF NOT EXISTS global_temporary_table; set search_path=global_temporary_table,sys; @@ -153,16 +153,16 @@ ERROR: Only support alter global temporary table in an empty context. HINT: Please create a new connection and execute ALTER TABLE on the new connection. -- should fail cluster gtt_on_commit_default using gtt_on_commit_default_pkey; -ERROR: not support cluster global temporary table +ERROR: clustering is not supported on a global temporary table -- should fail create table gtt_on_commit_default(a int primary key, b text) on commit delete rows; ERROR: ON COMMIT can only be used on temporary tables -- should fail REINDEX (TABLESPACE pg_default) TABLE gtt_test_createindex; -ERROR: The tablespace of global temporary table can not be changed +ERROR: The tablespace of global temporary table cannot be changed -- should fail REINDEX (TABLESPACE pg_default) INDEX gtt_idx_1; -ERROR: The tablespace of global temporary table can not be changed +ERROR: The tablespace of global temporary table cannot be changed -- should fail alter table gtt_on_commit_default set ( on_commit_delete_rows='true'); ERROR: table cannot add or modify on commit parameter by ALTER TABLE command. @@ -184,7 +184,7 @@ create global temp table gtt4(a int primary key, b text) with(on_commit_delete_r ERROR: could not create global temporary table with on commit and with clause at same time -- should fail CREATE MATERIALIZED VIEW mv_gtt_on_commit_default as select * from gtt_on_commit_default; -ERROR: materialized views must not use global temporary tables or views +ERROR: materialized views must not use global temporary tables -- test create table as select CREATE GLOBAL TEMPORARY TABLE test_create_table_as AS SELECT 1 AS a; -- test copy stmt @@ -482,7 +482,7 @@ select * from pg_gtt_stats where tablename = 'temp_table_test_systemview' order (2 rows) -- get all object info in current schema -select relname ,relkind, relpersistence, reloptions from pg_class c, pg_namespace n where c.relnamespace = n.oid and n.nspname = 'global_temporary_table' order by relkind,relpersistence,relname; +select relname, relkind, relpersistence, reloptions from pg_class c, pg_namespace n where c.relnamespace = n.oid and n.nspname = 'global_temporary_table' order by relkind,relpersistence,relname; relname | relkind | relpersistence | reloptions -------------------------------------------------+---------+----------------+------------------------------- global_temp_partition_01_2021_id_seq | S | g | {on_commit_delete_rows=false} diff --git a/src/test/regress/sql/global_temporary_table.sql b/src/test/regress/sql/global_temporary_table.sql index 51cd9bbbc0..e47c6aa3cf 100644 --- a/src/test/regress/sql/global_temporary_table.sql +++ b/src/test/regress/sql/global_temporary_table.sql @@ -1,5 +1,5 @@ -- --- GLobal emparary table test case +-- Global temporary table test case -- CREATE SCHEMA IF NOT EXISTS global_temporary_table; @@ -306,7 +306,7 @@ select schemaname, tablename, relpages, reltuples, relallvisible from pg_gtt_rel select * from pg_gtt_stats where tablename = 'temp_table_test_systemview' order by tablename; -- get all object info in current schema -select relname ,relkind, relpersistence, reloptions from pg_class c, pg_namespace n where c.relnamespace = n.oid and n.nspname = 'global_temporary_table' order by relkind,relpersistence,relname; +select relname, relkind, relpersistence, reloptions from pg_class c, pg_namespace n where c.relnamespace = n.oid and n.nspname = 'global_temporary_table' order by relkind,relpersistence,relname; reset search_path; drop schema global_temporary_table cascade; -- 2.17.1