| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: survey: psql syntax errors abort my transactions |
| Date: | 2020-07-06 08:15:29 |
| Message-ID: | a00e4c6489356f5a666b69f950d5bff7bc90eb73.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matthias Apitz | 2020-07-06 09:43:36 | PostgreSQL server does not increment a SERIAL internally |
| Previous Message | raf | 2020-07-06 01:04:02 | Re: survey: psql syntax errors abort my transactions |