pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: survey: psql syntax errors abort my transactions
Date: Mon, 06 Jul 2020 10:15:29 +0200
Message-ID: <a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at> (raw)
In-Reply-To: <b94cb1d2-8b53-edb9-18ec-991e5d5391c0@gmail.com>
References: <d3914fb6-6777-e532-fa4a-024672914cbc@amazon.com>
	<658a910b8a785a859f651102798ead5c851d8034.camel@cybertec.at>
	<b94cb1d2-8b53-edb9-18ec-991e5d5391c0@gmail.com>

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






view thread (12+ messages)

Message-ID: <a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at>
Permalink:  ../a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at/
Also on:    postgresql.org/message-id/a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, ronljohnsonjr@gmail.com
  Subject: Re: survey: psql syntax errors abort my transactions
  In-Reply-To: <a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at>
  References: <d3914fb6-6777-e532-fa4a-024672914cbc@amazon.com> <658a910b8a785a859f651102798ead5c851d8034.camel@cybertec.at> <b94cb1d2-8b53-edb9-18ec-991e5d5391c0@gmail.com> <a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox