4 ms·
Almost all DDL is transactional in PostgreSQL, so the usual equivalent to the above would be: begin; alter table current rename to current_old; alter tab
by lentil 15y ago
Almost all DDL is transactional in PostgreSQL, so the usual equivalent to the above would be:
begin;
alter table current rename to current_old;
alter table current_new rename to current;
commit;
Transaction-safe DDL is a very handy thing indeed.