mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 11:45:11 +08:00
Previously, negative dimension values had an off-by-one bug where the wrong chunk was created for points on chunk borders. This PR fixes that.
26 lines
410 B
PL/PgSQL
26 lines
410 B
PL/PgSQL
CREATE OR REPLACE FUNCTION assert_true(
|
|
val boolean
|
|
)
|
|
RETURNS VOID LANGUAGE PLPGSQL IMMUTABLE AS
|
|
$BODY$
|
|
BEGIN
|
|
IF !val THEN
|
|
RAISE 'Assert failed';
|
|
END IF;
|
|
END
|
|
$BODY$;
|
|
|
|
|
|
CREATE OR REPLACE FUNCTION assert_equal(
|
|
val1 anyelement,
|
|
val2 anyelement
|
|
)
|
|
RETURNS VOID LANGUAGE PLPGSQL IMMUTABLE AS
|
|
$BODY$
|
|
BEGIN
|
|
IF val1 != val2 THEN
|
|
RAISE 'Assert failed';
|
|
END IF;
|
|
END
|
|
$BODY$;
|