Re: survey: psql syntax errors abort my transactions - Mailing list pgsql-general

From Laurenz Albe
Subject Re: survey: psql syntax errors abort my transactions
Date
Msg-id a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at
Whole thread Raw
In response to Re: survey: psql syntax errors abort my transactions  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
On Fri, 2020-07-03 at 12:46 -0500, Ron wrote:
> > This is my favorite example why I like the way PostgreSQL does things:
> > 
> > /* poor man's VACUUM (FULL) */
> > BEGIN;
> > CREATTE TABLE t2 AS SELECT * FROM t1;
> > DROP TABLE t1;
> > ALTER TABLE t2 RENAME TO t1;
> > COMMIT;
> 
> How so, since it does not carry over indexes, foreign keys, triggers, 
> partition references, etc?

It is an example of what a transaction could look like that
would suffer from statement-level rollback.

I am not claimimg that that code as such is very useful.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: raf
Date:
Subject: Re: survey: psql syntax errors abort my transactions
Next
From: Matthias Apitz
Date:
Subject: PostgreSQL server does not increment a SERIAL internally