You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// see https://github.com/pgexperts/pg_plan_filter
33
+
// see also https://www.postgresql.org/docs/14/using-explain.html
34
+
postgrestQueryCostLimit: null,// or float
32
35
importMetadata: false,
33
36
...opt,
34
37
}
@@ -345,6 +348,11 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA "${opt.schema}" TO web_anon;
345
348
346
349
GRANT web_anon TO postgrest;
347
350
351
+
${opt.postgrestQueryCostLimit!==null ? `
352
+
-- If pg_plan_filter is installed, limit the cost of queries made by PostgREST users.
353
+
ALTER USER web_anon SET plan_filter.statement_cost_limit = ${opt.postgrestQueryCostLimit};
354
+
` : ''}
355
+
348
356
COMMENT ON SCHEMA "${opt.schema}" IS
349
357
$$GTFS REST API
350
358
This REST API is created by running [PostgREST](https://postgrest.org/) on top of a [PostgreSQL](https://www.postgresql.org) DB generated using [gtfs-via-postgres](https://github.com/public-transport/gtfs-via-postgres).
0 commit comments