Re: Is there a way to change current time? - Mailing list pgsql-performance

From Pavel Stehule
Subject Re: Is there a way to change current time?
Date
Msg-id CAFj8pRBb-G2_Afh+tDGEeoACqXSK_0ZakuH_pp-zG5bGKTrjgA@mail.gmail.com
Whole thread Raw
In response to Is there a way to change current time?  (Warstone@list.ru <warstone@list.ru>)
List pgsql-performance
Hi

čt 15. 4. 2021 v 15:45 odesílatel Warstone@list.ru <warstone@list.ru> napsal:
Hi,
 
Is there any way to set time that CURRENT_TIMESTAMP and/or now() will give next time? (We need it only for testing purposes so if there is any hack, cheat, etc. It will be fine)

This is a bad way - don't use now() in queries - use a variable instead. Later you can use now as an argument or some constant value.

Regards

Pavel
 
 
 
 
 

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is there a way to change current time?
Next
From: Eugene Pazhitnov
Date:
Subject: Re: Is there a way to change current time?