Limits on PostgreSQL schema changes inside transactions?

后端 未结 5 1296
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-11 09:59

My database background is with Oracle, so I was surprised to discover that Postgres includes schema changes in transactions - if you begin one, create a table and then rollb

5条回答
  •  情书的邮戳
    2021-01-11 10:57

    According to quick grep on docs, these commands cannot be executed in transactions:

    • cluster
    • commit prepared
    • create database
    • create tablespace
    • discard
    • drop database
    • drop tablespace
    • rollback prepared
    • vacuum

提交回复
热议问题