fix: Make recursive view parsing work with XMLTABLE + DEFAULT
This commit is contained in:
committed by
Wolfgang Walther
parent
ac3655df1d
commit
b99c8c897c
Vendored
+18
@@ -2462,3 +2462,21 @@ BEGIN
|
||||
|
||||
INSERT INTO deferrable_unique_constraint VALUES (1), (1);
|
||||
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$;
|
||||
|
||||
@@ -741,7 +741,9 @@ def test_admin_healthy_w_channel(defaultenv):
|
||||
}
|
||||
|
||||
with run(env=env) as postgrest:
|
||||
response = requests.get(f"http://localhost:{env['PGRST_ADMIN_SERVER_PORT']}/health")
|
||||
response = requests.get(
|
||||
f"http://localhost:{env['PGRST_ADMIN_SERVER_PORT']}/health"
|
||||
)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
@@ -755,7 +757,9 @@ def test_admin_healthy_wo_channel(defaultenv):
|
||||
}
|
||||
|
||||
with run(env=env) as postgrest:
|
||||
response = requests.get(f"http://localhost:{env['PGRST_ADMIN_SERVER_PORT']}/health")
|
||||
response = requests.get(
|
||||
f"http://localhost:{env['PGRST_ADMIN_SERVER_PORT']}/health"
|
||||
)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
@@ -768,5 +772,7 @@ def test_admin_not_found(defaultenv):
|
||||
}
|
||||
|
||||
with run(env=env) as postgrest:
|
||||
response = requests.get(f"http://localhost:{env['PGRST_ADMIN_SERVER_PORT']}/notfound")
|
||||
response = requests.get(
|
||||
f"http://localhost:{env['PGRST_ADMIN_SERVER_PORT']}/notfound"
|
||||
)
|
||||
assert response.status_code == 404
|
||||
|
||||
Reference in New Issue
Block a user