mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
16 lines
354 B
PL/PgSQL
16 lines
354 B
PL/PgSQL
BEGIN;
|
|
|
|
--
|
|
-- Create a function to purge from varnish cache
|
|
-- By default this adds the object to a pgq queue,
|
|
-- but this function can be replaced with a void one
|
|
-- when running a development version.
|
|
--
|
|
|
|
CREATE OR REPLACE FUNCTION varnish_purge(url text)
|
|
RETURNS bigint
|
|
AS $$
|
|
SELECT pgq.insert_event('varnish', 'P', $1);
|
|
$$ LANGUAGE 'sql';
|
|
|
|
COMMIT; |