Skip to content

Commit

Permalink
fix: permission denied for net tables
Browse files Browse the repository at this point in the history
Closes #72.
  • Loading branch information
steve-chavez committed Jan 23, 2024
1 parent 5c0b8f4 commit 9fcf324
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions sql/pg_net.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ create or replace function net.http_get(
volatile
parallel safe
language plpgsql
security definer
as $$
declare
request_id bigint;
Expand Down Expand Up @@ -159,7 +158,6 @@ create or replace function net.http_post(
volatile
parallel safe
language plpgsql
security definer
as $$
declare
request_id bigint;
Expand Down Expand Up @@ -229,7 +227,6 @@ create or replace function net.http_delete(
volatile
parallel safe
language plpgsql
security definer
as $$
declare
request_id bigint;
Expand Down Expand Up @@ -290,7 +287,6 @@ create or replace function net._http_collect_response(
volatile
parallel safe
language plpgsql
security definer
as $$
declare
rec net._http_response;
Expand Down Expand Up @@ -345,7 +341,6 @@ create or replace function net.http_collect_response(
volatile
parallel safe
language plpgsql
security definer
as $$
begin
raise notice 'The net.http_collect_response function is deprecated.';
Expand All @@ -359,8 +354,8 @@ create or replace function net.worker_restart() returns bool as $$
from pg_stat_activity
where backend_type ilike '%pg_net%';
$$
security definer
security definer -- needs SDF because of pg_terminate_backend
language sql;

grant all on schema net to postgres;
grant all on all tables in schema net to postgres;
grant usage on schema net to PUBLIC;
grant all on all tables in schema net to PUBLIC;

0 comments on commit 9fcf324

Please sign in to comment.