feat: Drop support for pg 9.6
This commit is contained in:
committed by
Wolfgang Walther
parent
ec110720dc
commit
daa77d17aa
Vendored
+25
-42
@@ -2289,26 +2289,22 @@ create table private.rollen (
|
||||
);
|
||||
|
||||
-- Tables used for testing embedding between partitioned tables
|
||||
create table test.car_models(
|
||||
name varchar(64) not null,
|
||||
year int not null
|
||||
) partition by list (year);
|
||||
|
||||
do $do$begin
|
||||
-- partitioned tables using the PARTITION syntax are supported from pg v10
|
||||
if (select current_setting('server_version_num')::int >= 100000) then
|
||||
create table test.car_models(
|
||||
name varchar(64) not null,
|
||||
year int not null
|
||||
) partition by list (year);
|
||||
|
||||
comment on table test.car_models is
|
||||
$$A partitioned table
|
||||
comment on table test.car_models is
|
||||
$$A partitioned table
|
||||
|
||||
A test for partitioned tables$$;
|
||||
|
||||
create table test.car_models_2021 partition of test.car_models
|
||||
for values in (2021);
|
||||
create table test.car_models_default partition of test.car_models
|
||||
for values in (1981,1997,2001,2013);
|
||||
end if;
|
||||
create table test.car_models_2021 partition of test.car_models
|
||||
for values in (2021);
|
||||
create table test.car_models_default partition of test.car_models
|
||||
for values in (1981,1997,2001,2013);
|
||||
|
||||
do $do$begin
|
||||
-- primary keys for partitioned tables are supported from pg v11
|
||||
if (select current_setting('server_version_num')::int >= 110000) then
|
||||
create table test.car_brands (
|
||||
@@ -2492,22 +2488,15 @@ BEGIN
|
||||
END$$;
|
||||
|
||||
-- This view is not used in any requests but just parsed by the pfkSourceColumns query.
|
||||
-- XMLTABLE is only supported from PG 10 on
|
||||
DO $do$
|
||||
BEGIN
|
||||
IF current_setting('server_version_num')::INT >= 100000 THEN
|
||||
CREATE VIEW test.xml AS
|
||||
SELECT *
|
||||
FROM (SELECT ''::xml AS data) _,
|
||||
XMLTABLE(
|
||||
''
|
||||
PASSING data
|
||||
COLUMNS id int PATH '@id',
|
||||
premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'
|
||||
);
|
||||
END IF;
|
||||
END
|
||||
$do$;
|
||||
CREATE VIEW test.xml AS
|
||||
SELECT *
|
||||
FROM (SELECT ''::xml AS data) _,
|
||||
XMLTABLE(
|
||||
''
|
||||
PASSING data
|
||||
COLUMNS id int PATH '@id',
|
||||
premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'
|
||||
);
|
||||
|
||||
-- https://github.com/PostgREST/postgrest/issues/1543
|
||||
CREATE TYPE complex AS (
|
||||
@@ -3277,17 +3266,11 @@ create table test.tbl_w_json(
|
||||
data json
|
||||
);
|
||||
|
||||
DO $do$
|
||||
BEGIN
|
||||
IF current_setting('server_version_num')::INT >= 100000 THEN
|
||||
CREATE TABLE test.channels (
|
||||
id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
|
||||
data jsonb DEFAULT '{"foo": "bar"}',
|
||||
slug text
|
||||
);
|
||||
END IF;
|
||||
END
|
||||
$do$;
|
||||
CREATE TABLE test.channels (
|
||||
id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
|
||||
data jsonb DEFAULT '{"foo": "bar"}',
|
||||
slug text
|
||||
);
|
||||
|
||||
CREATE FUNCTION test.is_superuser() RETURNS boolean
|
||||
LANGUAGE sql
|
||||
|
||||
Reference in New Issue
Block a user