小编use*_*783的帖子

Basic transactional DDL script in PostgreSQL

PostgreSQL newbie here trying to put together a transactional DDL script to atomically create a database and its schema in Postgres 9.3: in a transaction, create a few tables; if any errors, roll the whole thing back; otherwise commit. I'm having a hard time getting the syntax right, and I suspect my problems might stem from conflating SQL DDL with PL/pgSQL and/or not grokking the transaction semantics.

Long story short, what's the PL/pgSQL boilerplate for a script to do something …

postgresql transaction ddl plpgsql

6
推荐指数
1
解决办法
6934
查看次数

标签 统计

ddl ×1

plpgsql ×1

postgresql ×1

transaction ×1