1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

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 b8a18ad485 and
c22ecc6562 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
This commit is contained in:
Noah Misch
2019-03-08 20:16:27 -08:00
parent 82a5649fb9
commit 3c5926301a
5 changed files with 65 additions and 7 deletions

View File

@@ -104,4 +104,6 @@ extern int date2isoweek(int year, int mon, int mday);
extern int date2isoyear(int year, int mon, int mday);
extern int date2isoyearday(int year, int mon, int mday);
extern bool TimestampTimestampTzRequiresRewrite(void);
#endif /* TIMESTAMP_H */