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-12 23:47:40
Message-ID: 27637.1539388060@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-13 00:02:00 Re: Maximum password length
Previous Message Tom Lane 2018-10-12 23:34:53 Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel