-- -- pa_photo__delete_revision/1 -- create or replace function pa_photo__delete_revision( integer ) returns int4 as $$ declare revision_id alias for $1; -- do not need to delete from the pa_photos -- the on delete cascade will take care of this -- during the content_revision.delete begin PERFORM content_revision__delete (revision_id); return 0; end; $$ language plpgsql;