mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 19:59:48 +08:00
This changes the license text for SQL files to be identical with the license text for C files.
39 lines
790 B
PL/PgSQL
39 lines
790 B
PL/PgSQL
-- This file and its contents are licensed under the Apache License 2.0.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-APACHE for a copy of the license.
|
|
|
|
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$;
|
|
|
|
\c :DBNAME :ROLE_SUPERUSER
|
|
|
|
CREATE OR REPLACE FUNCTION allow_downgrade_to_apache()
|
|
RETURNS VOID
|
|
AS :MODULE_PATHNAME, 'ts_allow_downgrade_to_apache'
|
|
LANGUAGE C;
|
|
|
|
\c :DBNAME :ROLE_DEFAULT_PERM_USER
|