22 lines
380 B
MySQL
22 lines
380 B
MySQL
|
CREATE FUNCTION _api.user_update()
|
||
|
RETURNS TRIGGER
|
||
|
LANGUAGE plpgsql VOLATILE
|
||
|
AS $BODY$
|
||
|
DECLARE
|
||
|
_length INTEGER;
|
||
|
BEGIN
|
||
|
RETURN NEW;
|
||
|
END
|
||
|
$BODY$;
|
||
|
|
||
|
GRANT EXECUTE ON FUNCTION _api.user_update()
|
||
|
TO rest_user;
|
||
|
GRANT DELETE ON TABLE api.user
|
||
|
TO rest_user;
|
||
|
|
||
|
CREATE TRIGGER api_user_update_trgr
|
||
|
INSTEAD OF UPDATE
|
||
|
ON api.user
|
||
|
FOR EACH ROW
|
||
|
EXECUTE PROCEDURE _api.user_update();
|