Freezing localtimestamp and other time function on some value

From: Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: Freezing localtimestamp and other time function on some value
Date: 2016-04-12 10:50:11
Message-ID: 570CD2E3.4030400@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In oracle there is alter system set fixed_date command. Have Postgres
this functionality?

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Petr Korobeinikov 2016-04-12 11:31:59 Re: Freezing localtimestamp and other time function on some value
Previous Message Alexander Pyhalov 2016-04-12 08:06:42 pgpool-II: cannot use serializable mode in a hot standby