Files
vinciandtomsun28 1d29ac3d7d support postgresql store meta data instead of h2 database (#828)
support postgresql store meta data instead of h2 database
add docker-compose file for postgresql
add related docs

  Update home docs start postgresql-change.md

Co-authored-by: tomsun28 <tomsun28@outlook.com>
Signed-off-by: vinci <55838224+vinci-897@users.noreply.github.com>

  Update home docs start postgresql-change.md

Co-authored-by: tomsun28 <tomsun28@outlook.com>
Signed-off-by: vinci <55838224+vinci-897@users.noreply.github.com>

  Update home docs start postgresql-change.md

Co-authored-by: tomsun28 <tomsun28@outlook.com>
Signed-off-by: vinci <55838224+vinci-897@users.noreply.github.com>

  Update home docs start postgresql-change.md

Co-authored-by: tomsun28 <tomsun28@outlook.com>
Signed-off-by: vinci <55838224+vinci-897@users.noreply.github.com>

---------

Signed-off-by: vinci <55838224+vinci-897@users.noreply.github.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2023-04-01 23:10:41 +08:00

26 lines
1.0 KiB
SQL

-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- this file works for PostgreSQL.
CREATE EXTENSION IF NOT EXISTS dblink;
DO $$
BEGIN
PERFORM dblink_exec('', 'CREATE DATABASE hertzbeat');
EXCEPTION WHEN duplicate_database THEN RAISE NOTICE '%, skipping', SQLERRM USING ERRCODE = SQLSTATE;
END
$$;