Corey Huinker <corey.huin...@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