PostgreSQL: Enhancements in 7.4: Read only transactions

  • No data can be modified inside transaction, only read
  • Not a security measure
  • Useful for debugging/examining production databases
01 template1=# begin;
02 BEGIN
03 template1=# set transaction read only;
04 SET
05 template1=# delete from foo;
06 ERROR:  25006: transaction is read-only
Prev

Next

Page 23