mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 11:03:36 +08:00
Functions marked IMMUTABLE should also be parallel safe, but aren't by default. This change marks all immutable functions as parallel safe and removes the IMMUTABLE definitions on some functions that have been wrongly labeled as IMMUTABLE. If functions that are IMMUTABLE does not have the PARALLEL SAFE label, then some standard PostgreSQL regression tests will fail (this is true for PostgreSQL >= 10).
9 lines
433 B
SQL
9 lines
433 B
SQL
-- Deprecated partition hash function
|
|
CREATE OR REPLACE FUNCTION _timescaledb_internal.get_partition_for_key(val anyelement)
|
|
RETURNS int
|
|
AS '$libdir/timescaledb', 'get_partition_for_key' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
|
|
|
CREATE OR REPLACE FUNCTION _timescaledb_internal.get_partition_hash(val anyelement)
|
|
RETURNS int
|
|
AS '$libdir/timescaledb', 'get_partition_hash' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|