From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE times
Date: Sat, 09 Mar 2019 04:21:12 +0000
Message-ID: <E1h2TU0-00059a-Ds@gemulon.postgresql.org> (raw)
Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE timestamp.
When the timezone is UTC, timestamptz and timestamp are binary coercible
in both directions. See b8a18ad4850ea5ad7884aa6ab731fd392e73b4ad and
c22ecc6562aac895f0f0529707d7bdb460fd2a49 for the previous attempt in
this problem space. Skip the table rewrite; for now, continue to
needlessly rewrite any index on an affected column.
Reviewed by Simon Riggs and Tom Lane.
Discussion: https://postgr.es/m/20190226061450.GA1665944@rfd.leadboat.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3c5926301aea476025f118159688a6a88b2738bc
Modified Files
--------------
src/backend/commands/tablecmds.c | 32 ++++++++++++++++++++++++-----
src/backend/utils/adt/timestamp.c | 17 +++++++++++++++
src/include/utils/timestamp.h | 2 ++
src/test/regress/expected/event_trigger.out | 11 +++++++++-
src/test/regress/sql/event_trigger.sql | 10 ++++++++-
5 files changed, 65 insertions(+), 7 deletions(-)
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-committers@postgresql.org
Cc: noah@leadboat.com
Subject: Re: pgsql: Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE times
In-Reply-To: <E1h2TU0-00059a-Ds@gemulon.postgresql.org>
References: <E1h2TU0-00059a-Ds@gemulon.postgresql.org>
* 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