On 9/13/24 15:05, Andreas Karlsson wrote:
On 9/13/24 4:41 AM, Laurenz Albe wrote:
That's very broken and should not be allowed.
+1
A possible objection is that if anybody has such a setup and
hasn't noticed a problem because they never change their
timezone setting, they might not appreciate us breaking it.
I hope that there are few cases of that in the field, and I think it
is OK to break them. After all, it can be fixed with a simple
ALTER TABLE foo ALTER id TYPE timestamptz;
If the session time zone is UTC, that wouldn't even require a rewrite.
I agree that it cannot be backpatched.
I unfortunately suspect there might be more cases than we think in the
field due to many people not understanding the difference between
timestamp and timestamptz but the good thing is that
timestamp/timestamptz are rare in foreign keys, even in composite ones.
It will become a lot more common with WITHOUT OVERLAPS, so I think it is
important to fix this at the same time or earlier as that feature.
Since this is quite broken and does not have any real world usefulness I
think we should just go ahead and disallow it and have a few people
complain.
+1
--
Vik Fearing