Larry Rosenman <ler(at)lerctr(dot)org> writes:> CREATE FUNCTION "nowminus" (interval) RETURNS timestamp with time zone AS 'SELECT now() - $1;' LANGUAGE 'sql';
Right idea, but you need to mark it iscachable.
regards, tom lane