]> granicus.if.org Git - postgresql/commit
Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE timestamp.
authorNoah Misch <noah@leadboat.com>
Sat, 9 Mar 2019 04:16:27 +0000 (20:16 -0800)
committerNoah Misch <noah@leadboat.com>
Sat, 9 Mar 2019 04:16:27 +0000 (20:16 -0800)
commit3c5926301aea476025f118159688a6a88b2738bc
tree22d481ae1e71858d81a3a442a444dd93878a3320
parent82a5649fb9dbef12d04cd24799be6bf298d889a6
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
src/backend/commands/tablecmds.c
src/backend/utils/adt/timestamp.c
src/include/utils/timestamp.h
src/test/regress/expected/event_trigger.out
src/test/regress/sql/event_trigger.sql