Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgreSQL.org
Date: 2018-10-14T16:16:49Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On 2018-10-12 19:47:40 -0400, Tom Lane wrote: >> So I went looking for a different example to plug in there, and soon >> found that there weren't any. If you change all the physically_coercible >> calls in that script to binary_coercible, its output doesn't change. >> I'm thinking that we ought to do that, and just get rid of >> physically_coercible(), so that we have a tighter, more semantically >> meaningful set of checks here. We can always undo that if we ever >> have occasion to type-cheat like that again, but offhand I'm not sure >> why we would do so. > Hm, I wonder if it's not a good idea to leave the test there, or rewrite > it slightly, so we have a a more precise warning about cheats like that? After thinking about this for awhile, I decided that physically_coercible() is poorly named, because it suggests that it might for instance allow any 4-byte type to be cast to any other one. Actually the additional cases it allows are just ones where an explicit binary-coercion cast would be needed. So I still think we should tighten up the tests while we can, but I left that function in place with a different name and a better comment. regards, tom lane
Commits
-
Clean up/tighten up coercibility checks in opr_sanity regression test.
- e9f42d529f99 12.0 landed
-
Remove abstime, reltime, tinterval tables from old regression databases.
- fb583c80d230 9.3.25 landed
- 7b88c1ddd049 9.4.20 landed
- 9320263ae7ca 10.6 landed
- 43cc4e49edff 9.5.15 landed
- 2ad422ce10a4 9.6.11 landed
- 184951a48a10 11.0 landed