mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
To increase schema security we do not want to mix our own internal objects with user objects. Since chunks are created in the _timescaledb_internal schema our internal functions should live in a different dedicated schema. This patch make the necessary adjustments for the following functions: - to_unix_microseconds(timestamptz) - to_timestamp(bigint) - to_timestamp_without_timezone(bigint) - to_date(bigint) - to_interval(bigint) - interval_to_usec(interval) - time_to_internal(anyelement) - subtract_integer_from_now(regclass, bigint)
19 lines
650 B
SQL
19 lines
650 B
SQL
-- 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.
|
|
|
|
DROP DATABASE IF EXISTS test;
|
|
CREATE DATABASE test;
|
|
\c test
|
|
\timing
|
|
|
|
DROP EXTENSION IF EXISTS timescaledb CASCADE;
|
|
CREATE EXTENSION timescaledb;
|
|
|
|
SELECT pg_backend_pid();
|
|
|
|
CREATE TABLE test_hyper (i bigint, j double precision, k bigint, ts timestamp);
|
|
SELECT create_hypertable('test_hyper', 'i', chunk_time_interval=>10);
|
|
|
|
INSERT INTO test_hyper SELECT random()*100, random()*100, x*10, _timescaledb_functions.to_timestamp(x) FROM generate_series(1,100000000) AS x;
|