mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-22 05:31:41 +08:00
28 lines
606 B
SQL
28 lines
606 B
SQL
\set ON_ERROR_STOP 1
|
|
\o /dev/null
|
|
\ir include/insert_two_partitions.sql
|
|
\o
|
|
\set ECHO ALL
|
|
|
|
\c single
|
|
\d+ "_timescaledb_internal".*
|
|
|
|
-- Test that renaming hypertable is blocked
|
|
\set ON_ERROR_STOP 0
|
|
ALTER TABLE "testNs" 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 "testNs";
|
|
|
|
SELECT * FROM _timescaledb_catalog.hypertable;
|
|
\dt "public".*
|
|
\dt "_timescaledb_catalog".*
|
|
\dt+ "_timescaledb_internal".*
|
|
|