CREATE OR REPLACE FUNCTION nn_db.user_activate(
	in_pk_user nn_db.user.pk_user%TYPE)
RETURNS TABLE(confirm boolean)
AS $$
BEGIN
	UPDATE nn_db.user
		SET is_active = True
	WHERE
		pk_user = in_pk_user;
	RETURN QUERY SELECT 
		is_active = True 
	FROM nn_db.user
	WHERE
		nn_db.user.pk_user = in_pk_user;
END;
$$ LANGUAGE plpgsql