select setval('hibernate_sequence', max(rev)) from revinfo;
