mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-19 12:13:24 +08:00
Clean up the table schema to get rid of legacy tables and functionality that makes it more difficult to provide an upgrade path. Notable changes: * Get rid of legacy tables and code * Simplify directory structure for SQL code * Simplify table hierarchy: remove root table and make chunk tables * inherit directly from main table * Change chunk table suffix from _data to _chunk * Simplify schema usage: _timescaledb_internal for internal functions. * _timescaledb_catalog for metadata tables. * Remove postgres_fdw dependency * Improve code comments in sql code
14 lines
382 B
SQL
14 lines
382 B
SQL
\unset ECHO
|
|
\o /dev/null
|
|
\ir include/create_single_db.sql
|
|
\o
|
|
\set ECHO errors
|
|
\set VERBOSITY default
|
|
|
|
DO $$
|
|
BEGIN
|
|
ASSERT( _timescaledb_internal.get_partition_for_key('', 16:: INT4) = 13 );
|
|
ASSERT( _timescaledb_internal.get_partition_for_key('dev1', 16:: INT4) = 4 );
|
|
ASSERT( _timescaledb_internal.get_partition_for_key('longlonglonglongpartitionkey', 16:: INT4) = 6 );
|
|
END$$;
|