2016-04-12 13:50 GMT+03:00 Alex Ignatov <a.igna...@postgrespro.ru>:

> Hello!
> Is there any method to freeze localtimestamp and other time function value.
> Say after freezing on some value sequential calls to these functions give
> you the same value over and over again.
> This  is useful primarily for testing.
>

Hello!

I hope, the following snippet will be helpful.
```
begin;
select now(), current_timestamp, clock_timestamp();
select pg_sleep(5);
select now(), current_timestamp, clock_timestamp();
commit;
```

Reply via email to