# begin; --> start a transaction create table testtable(id serial, c text); --> ... and create a table BEGIN CREATE TABLE # insert into testtable (c) values ('this will be short-lived'); --> insert a row INSERT 0 1 # select * from testtable; --> have a look id | c ----+-------------------------- 1 | this will be short-lived (1 row) # rollback; --> go back to initial state before begin ROLLBACK # select * from testtable; --> now the table is gone... ERROR: relation "testtable" does not exist LINE 1: select * from testtable; ^