mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 18:43:18 +08:00
Make aggregate serialize and deserialize functions STRICT
Aggregate functions that have serialize and deserialize support functions (histogram, last, first, etc.) should have these support functions marked STRICT. PostgreSQL's regular test suite will fail when the timescaledb module is loaded without these functions being marked STRICT.
This commit is contained in:
parent
c552410f69
commit
2ffb30d990
@ -26,12 +26,12 @@ LANGUAGE C IMMUTABLE;
|
||||
CREATE OR REPLACE FUNCTION _timescaledb_internal.bookend_serializefunc(internal)
|
||||
RETURNS bytea
|
||||
AS '$libdir/timescaledb', 'bookend_serializefunc'
|
||||
LANGUAGE C IMMUTABLE;
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION _timescaledb_internal.bookend_deserializefunc(bytea, internal)
|
||||
RETURNS internal
|
||||
AS '$libdir/timescaledb', 'bookend_deserializefunc'
|
||||
LANGUAGE C IMMUTABLE;
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
--This aggregate returns the "first" element of the first argument when ordered by the second argument.
|
||||
--Ex. first(temp, time) returns the temp value for the row with the lowest time
|
||||
@ -60,5 +60,3 @@ CREATE AGGREGATE last(anyelement, "any") (
|
||||
FINALFUNC = _timescaledb_internal.bookend_finalfunc,
|
||||
FINALFUNC_EXTRA
|
||||
);
|
||||
|
||||
|
||||
|
@ -11,12 +11,12 @@ LANGUAGE C IMMUTABLE;
|
||||
CREATE OR REPLACE FUNCTION _timescaledb_internal.hist_serializefunc(INTERNAL)
|
||||
RETURNS bytea
|
||||
AS '$libdir/timescaledb', 'hist_serializefunc'
|
||||
LANGUAGE C IMMUTABLE;
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION _timescaledb_internal.hist_deserializefunc(bytea, INTERNAL)
|
||||
RETURNS INTERNAL
|
||||
AS '$libdir/timescaledb', 'hist_deserializefunc'
|
||||
LANGUAGE C IMMUTABLE;
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION _timescaledb_internal.hist_finalfunc(state INTERNAL, val DOUBLE PRECISION, MIN DOUBLE PRECISION, MAX DOUBLE PRECISION, nbuckets INTEGER)
|
||||
RETURNS INTEGER[]
|
||||
|
Loading…
x
Reference in New Issue
Block a user