Update utils.sql

This commit is contained in:
dullbananas 2024-06-10 14:20:18 -07:00 committed by GitHub
parent 87e86825f4
commit dbeffbc7f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.