Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel
Date: 2018-10-14 16:16:49
Message-ID: 12407.1539533809@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-14 16:20:55 Re: rowcount estimate varies WRT partitionwise_join
Previous Message Justin Pryzby 2018-10-14 15:09:15 rowcount estimate varies WRT partitionwise_join