mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-21 21:21:22 +08:00
Previously, each test set their own (although mostly the same) configuration for log output and error verbosity. This is now set globally in the test runner so that tests only need to set these configuration parameters if they need to override the defaults. The log verbosity is also reduced so that errors aren't generated with the line number of the source file that output the error. Line numbers in the output can break tests when upgrading to a new PostgreSQL version that outputs a different line number.
26 lines
600 B
SQL
26 lines
600 B
SQL
\o /dev/null
|
|
\ir include/insert_two_partitions.sql
|
|
\o
|
|
|
|
\d+ "_timescaledb_internal".*
|
|
|
|
-- Test that renaming hypertable is blocked
|
|
\set VERBOSITY default
|
|
\set ON_ERROR_STOP 0
|
|
ALTER TABLE "two_Partitions" RENAME TO "newname";
|
|
\set ON_ERROR_STOP 1
|
|
|
|
-- Test that renaming ordinary table works
|
|
CREATE TABLE renametable (foo int);
|
|
ALTER TABLE "renametable" RENAME TO "newname";
|
|
SELECT * FROM "newname";
|
|
|
|
SELECT * FROM _timescaledb_catalog.hypertable;
|
|
DROP TABLE "two_Partitions";
|
|
|
|
SELECT * FROM _timescaledb_catalog.hypertable;
|
|
\dt "public".*
|
|
\dt "_timescaledb_catalog".*
|
|
\dt+ "_timescaledb_internal".*
|
|
|