test: move prepared statements config related tests to spec tests

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-07-07 23:32:40 +05:00
parent 44edf962d8
commit c03ac09dbb
7 changed files with 47 additions and 42 deletions
@@ -512,23 +512,6 @@
pdSchema: public
pdVolatility: Volatile
- - qiName: uses_prepared_statements
qiSchema: public
- - pdDescription: null
pdFuncSettings: []
pdHasVariadic: false
pdName: uses_prepared_statements
pdParams: []
pdReturnType:
contents:
contents:
qiName: bool
qiSchema: pg_catalog
tag: Scalar
tag: Single
pdSchema: public
pdVolatility: Volatile
- - qiName: repeatable_read_isolation_level
qiSchema: public
- - pdDescription: null
-4
View File
@@ -54,10 +54,6 @@ create function v1.get_guc_value(name text) returns text as $$
select nullif(current_setting(name), '')::text;
$$ language sql;
create function uses_prepared_statements() returns bool as $$
select count(name) > 0 from pg_catalog.pg_prepared_statements
$$ language sql;
create function change_max_rows_config(val int, notify bool default false) returns void as $_$
begin
execute format($$
-21
View File
@@ -420,27 +420,6 @@ def test_notify_do_nothing(defaultenv):
assert output == []
def test_db_prepared_statements_enable(defaultenv):
"Should use prepared statements when the setting is enabled."
with run(env=defaultenv) as postgrest:
response = postgrest.session.post("/rpc/uses_prepared_statements")
assert response.text == "true"
def test_db_prepared_statements_disable(defaultenv):
"Should not use any prepared statements when the setting is disabled."
env = {
**defaultenv,
"PGRST_DB_PREPARED_STATEMENTS": "false",
}
with run(env=env) as postgrest:
response = postgrest.session.post("/rpc/uses_prepared_statements")
assert response.text == "false"
def test_statement_timeout(defaultenv, metapostgrest):
"Statement timeout times out slow statements"