mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 18:13:18 +08:00
All partitioning functions now has the signature `int func(anyelement)`. This cleans up some special handling that was necessary to support the legacy partitioning function that expected text input.
10 lines
330 B
SQL
10 lines
330 B
SQL
\set ECHO errors
|
|
\set VERBOSITY default
|
|
|
|
DO $$
|
|
BEGIN
|
|
ASSERT( _timescaledb_internal.get_partition_for_key(''::text) = 669664877 );
|
|
ASSERT( _timescaledb_internal.get_partition_for_key('dev1'::text) = 1129986420 );
|
|
ASSERT( _timescaledb_internal.get_partition_for_key('longlonglonglongpartitionkey'::text) = 1169179734);
|
|
END$$;
|