pg_format

pull/4797/head
Dull Bananas 2024-06-25 18:57:09 +00:00
parent 28e04b42d3
commit 7f435cf657
2 changed files with 6 additions and 6 deletions

View File

@ -566,7 +566,7 @@ BEGIN
END IF; END IF;
-- Set local ap_id -- Set local ap_id
IF NEW.local THEN IF NEW.local THEN
NEW.ap_id = coalesce(NEW.ap_id, r.local_url('/comment/' || id)); NEW.ap_id = coalesce(NEW.ap_id, r.local_url ('/comment/' || id));
END IF; END IF;
RETURN NEW; RETURN NEW;
END END
@ -584,7 +584,7 @@ CREATE FUNCTION r.post_change_values ()
BEGIN BEGIN
-- Set local ap_id -- Set local ap_id
IF NEW.local THEN IF NEW.local THEN
NEW.ap_id = coalesce(NEW.ap_id, r.local_url('/post/' || NEW.id::text)); NEW.ap_id = coalesce(NEW.ap_id, r.local_url ('/post/' || NEW.id::text));
END IF; END IF;
RETURN NEW; RETURN NEW;
END END
@ -602,7 +602,7 @@ CREATE FUNCTION r.private_message_change_values ()
BEGIN BEGIN
-- Set local ap_id -- Set local ap_id
IF NEW.local THEN IF NEW.local THEN
NEW.ap_id = coalesce(NEW.ap_id, r.local_url('/private_message/' || NEW.id::text)); NEW.ap_id = coalesce(NEW.ap_id, r.local_url ('/private_message/' || NEW.id::text));
END IF; END IF;
RETURN NEW; RETURN NEW;
END END

View File

@ -60,9 +60,9 @@ $$;
CREATE FUNCTION r.local_url (url_path text) CREATE FUNCTION r.local_url (url_path text)
RETURNS text RETURNS text
LANGUAGE sql LANGUAGE sql
STABLE PARALLEL SAFE STABLE PARALLEL SAFE RETURN (
RETURN ( current_setting('lemmy.protocol_and_hostname') || url_path
current_setting ('lemmy.protocol_and_hostname') || url_path); );
-- This function creates statement-level triggers for all operation types. It's designed this way -- This function creates statement-level triggers for all operation types. It's designed this way
-- because of these limitations: -- because of these limitations: