On Tue, Aug 15, 2017 at 11:37 PM, Piotr Stefaniak <postg...@piotr-stefaniak.me> wrote: > At the very least, I think timestamptz_in() should either complain about > being called outside of transaction or return the expected value, > because returning year 2000 is unuseful at best. I would also like to > become able to do what I'm doing in a less hacky way (assuming there > isn't one already but I may be wrong), perhaps once there is a new > 'furthest' setting for recovery_target or when recovery_target_time = > 'now' works as I expected.
Hm. I think that the most simple solution here would be to change GetCurrentDateTime() and GetCurrentTimeUsec() so as they use GetCurrentTimestamp() instead of the transaction-level equivalents if those code paths are invoked outside of a transaction. Any code using those routines would get stupid timestamps anyway if they try to use keywords like 'today', 'now' or 'tomorrow' so that does not sound like a bad change to me. And yes, that's clearly a bug. Nice discovery. -- Michael -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers