Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View libovness's full-sized avatar

Jonathan Libov libovness

View GitHub Profile
// Deletes the image object in storage when the corresponding record is deleted
CREATE OR REPLACE FUNCTION delete_corresponding_image() RETURNS trigger AS
$$BEGIN
DELETE
FROM storage.objects o
LEFT JOIN public.images ON i.id = o.image_id
RETURN NULL;
END;$$ LANGUAGE plpgsql;
Verifying that +libovness is my blockchain ID. https://onename.com/libovness
Verifying that +libovness is my openname (Bitcoin username). https://onename.io/libovness