Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel
Date
Msg-id 27637.1539388060@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel
List pgsql-hackers
BTW, I was annoyed while looking things over that this patch had broken
a couple of comments in opr_sanity.sql:

@@ -823,7 +823,6 @@ WHERE a.aggfnoid = p.oid AND
 
 -- Cross-check transfn against its entry in pg_proc.
 -- NOTE: use physically_coercible here, not binary_coercible, because
--- max and min on abstime are implemented using int4larger/int4smaller.
 SELECT a.aggfnoid::oid, p.proname, ptr.oid, ptr.proname
 FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS ptr
 WHERE a.aggfnoid = p.oid AND
@@ -978,7 +977,6 @@ WHERE a.aggfnoid = p.oid AND
 -- Check that all combine functions have signature
 -- combine(transtype, transtype) returns transtype
 -- NOTE: use physically_coercible here, not binary_coercible, because
--- max and min on abstime are implemented using int4larger/int4smaller.
 
 SELECT a.aggfnoid, p.proname
 FROM pg_aggregate as a, pg_proc as p

Just removing a fraction of the sentence is not good.

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.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel
Next
From: Tom Lane
Date:
Subject: Re: Maximum password length