Re: Push down time-related SQLValue functions to foreign server - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Push down time-related SQLValue functions to foreign server
Date
Msg-id 261294.1642484638@sss.pgh.pa.us
Whole thread Raw
In response to Re: Push down time-related SQLValue functions to foreign server  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: Push down time-related SQLValue functions to foreign server
List pgsql-hackers
Corey Huinker <corey.huinker@gmail.com> writes:
> I'm very late to the party, but it seems to me that this effort is
> describing a small subset of what "routine mapping" seems to be for:
> defining function calls that can be pushed down to the foreign server, and
> the analogous function on the foreign side. We may want to consider
> implementing just enough of CREATE ROUTINE MAPPING and DROP ROUTINE MAPPING
> to support these specific fixed functions.

Hmm ... not really, because for these particular functions, the
point is exactly that we *don't* translate them to some function
call on the remote end.  We evaluate them locally and push the
resulting constant to the far side, thus avoiding issues like
clock skew.

Having said that: why couldn't that implementation sketch be used
for ANY stable subexpression?  What's special about the datetime
SQLValueFunctions?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: a misbehavior of partition row movement (?)
Next
From: Ronan Dunklau
Date:
Subject: Re: Proposal: More structured logging