This routine works well on postgres v10:
CREATE FUNCTION test_savepoint() RETURNS VOID AS $body$
BEGIN
SAVEPOINT my_savepoint;
ROLLBACK TO my_savepoint;
END $body$ LANGUAGE plpgsql;
The same code can not be compiled in postgres v11 beta 3, I got error:
[42601] ERROR: syntax error at or near "TO"
Position: 117
Best regards
David Klika