timescaledb/sql/installation_metadata.sql
Sven Klemm f89fd07c5b Remove year from SQL file license text
This changes the license text for SQL files to be identical
with the license text for C files.
2019-01-13 23:30:22 +01:00

15 lines
755 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.
CREATE OR REPLACE FUNCTION _timescaledb_internal.generate_uuid() RETURNS UUID
AS '@MODULE_PATHNAME@', 'ts_uuid_generate' LANGUAGE C VOLATILE STRICT;
-- Insert uuid and install_timestamp on database creation. Don't
-- create exported_uuid because it gets exported and installed during
-- pg_dump, which would cause a conflict.
INSERT INTO _timescaledb_catalog.installation_metadata
SELECT 'uuid', _timescaledb_internal.generate_uuid() ON CONFLICT DO NOTHING;
INSERT INTO _timescaledb_catalog.installation_metadata
SELECT 'install_timestamp', now() ON CONFLICT DO NOTHING;