Sorry.
I have re-read my previous message.
It looks unclean.

For sequential calls in same transaction `now()` and `current_timestamp`
will produce the same output.

```
begin; -- start a transaction

select
  now() immutable_now,
  current_timestamp immutable_current_ts,
  clock_timestamp() mutable_clock_ts;

select pg_sleep(1); -- wait a couple of time

select
  now() immutable_now, -- same as above
  current_timestamp immutable_current_ts, -- same as above
  clock_timestamp() mutable_clock_ts; -- value changed

select pg_sleep(1); -- wait a couple of time again

select
  now() immutable_now, -- same as above
  current_timestamp immutable_current_ts, -- same as above
  clock_timestamp() mutable_clock_ts; -- value changed

commit; -- commit or rollback
```

Reply via email to