Files
crankshaft/src/pg/test/sql/01_install_test.sql
2019-12-19 17:52:44 +01:00

21 lines
395 B
PL/PgSQL

\set ECHO none
\set QUIET on
SET client_min_messages TO error;
-- Create role publicuser if it does not exist
DO
$$
BEGIN
IF NOT EXISTS (
SELECT *
FROM pg_catalog.pg_user
WHERE usename = 'publicuser') THEN
CREATE ROLE publicuser LOGIN;
END IF;
END
$$ LANGUAGE plpgsql;
-- Install the extension
CREATE EXTENSION crankshaft VERSION 'dev' CASCADE;
\set QUIET off