mirror of https://github.com/LemmyNet/lemmy.git
pg_format
parent
28e04b42d3
commit
7f435cf657
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue