feat: allow to verify the PostgREST version through SQL

This commit is contained in:
Laurence Isla
2023-07-03 18:31:32 -05:00
committed by GitHub
parent a17dd41d6b
commit 7508230760
6 changed files with 98 additions and 2 deletions
+9
View File
@@ -158,3 +158,12 @@ create or replace function migrate_function() returns void as $_$
$$ language sql;
notify pgrst, 'reload schema';
$_$ language sql security definer;
create or replace function get_pgrst_version() returns text
language sql
as $$
select application_name
from pg_stat_activity
where application_name ilike 'postgrest%'
limit 1;
$$