Skip to main content
3 of 3
Commonmark migration

Just use REVOKE to control the permissions Postgres assigns to roles.

Documentation:

The REVOKE command revokes previously granted privileges from one or more roles. The key word PUBLIC refers to the implicitly defined group of all roles.

See the description of the GRANT command for the meaning of the privilege types.

CREATE FUNCTION nocando()
RETURNS void AS $$
  SELECT null::void
$$ LANGUAGE sql;

REVOKE ALL
  ON FUNCTION nocando ()
  FROM PUBLIC ;
Evan Carroll
  • 64.7k
  • 49
  • 251
  • 496