Remove public from schema cache event trigger
This commit is contained in:
committed by
Laurence Isla
parent
593b8bf385
commit
49cd1f3447
@@ -147,7 +147,7 @@ You can do automatic schema cache reloading in a pure SQL way and forget about s
|
|||||||
.. code-block:: postgresql
|
.. code-block:: postgresql
|
||||||
|
|
||||||
-- Create an event trigger function
|
-- Create an event trigger function
|
||||||
CREATE OR REPLACE FUNCTION public.pgrst_watch() RETURNS event_trigger
|
CREATE OR REPLACE FUNCTION pgrst_watch() RETURNS event_trigger
|
||||||
LANGUAGE plpgsql
|
LANGUAGE plpgsql
|
||||||
AS $$
|
AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -158,7 +158,7 @@ You can do automatic schema cache reloading in a pure SQL way and forget about s
|
|||||||
-- This event trigger will fire after every ddl_command_end event
|
-- This event trigger will fire after every ddl_command_end event
|
||||||
CREATE EVENT TRIGGER pgrst_watch
|
CREATE EVENT TRIGGER pgrst_watch
|
||||||
ON ddl_command_end
|
ON ddl_command_end
|
||||||
EXECUTE PROCEDURE public.pgrst_watch();
|
EXECUTE PROCEDURE pgrst_watch();
|
||||||
|
|
||||||
Now, whenever the ``pgrst_watch`` trigger is fired in the database, PostgREST will automatically reload the schema cache.
|
Now, whenever the ``pgrst_watch`` trigger is fired in the database, PostgREST will automatically reload the schema cache.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user