mydb=# create table num(
mydb(# id int,
mydb(# value int);
CREATE TABLE
mydb=# insert into num values (1,17),(2,68),(3,-34);
INSERT 0 3
mydb=# select * from num;
id | value
----+-------
1 | 17
2 | 68
3 | -34
(3 rows)
mydb=# begin;
BEGIN
mydb=# savepoint m;
SAVEPOINT
mydb=# update num set value=9;
UPDATE 3
mydb=# select * from num;
id | value
----+-------
1 | 9
2 | 9
3 | 9
(3 rows)
mydb=# roolback to m;
ERROR: syntax error at or near "roolback"
LINE 1: roolback to m;
^
mydb=# rollback to m;
ROLLBACK
mydb=# select * from num;
id | value
----+-------
1 | 17
2 | 68
3 | -34
(3 rows)
mydb=# commit;
COMMIT
mydb=#