From dbeffbc7f196274641f0f75b5136e15ee1624505 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Mon, 10 Jun 2024 14:20:18 -0700 Subject: [PATCH] Update utils.sql --- crates/db_schema/replaceable_schema/utils.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/db_schema/replaceable_schema/utils.sql b/crates/db_schema/replaceable_schema/utils.sql index f236c5387..4fbc7ff57 100644 --- a/crates/db_schema/replaceable_schema/utils.sql +++ b/crates/db_schema/replaceable_schema/utils.sql @@ -57,6 +57,13 @@ BEGIN END; $$; +CREATE FUNCTION r.local_url (url_path text) + RETURNS text + LANGUAGE sql + STABLE PARALLEL SAFE + RETURN ( + current_setting ('lemmy.protocol_and_hostname') || url_path) + -- This function creates statement-level triggers for all operation types. It's designed this way -- because of these limitations: -- * A trigger that uses transition tables can only handle 1 operation type.