1

I would like to read the current timestamp from the PostgreSQL database with the following query:

select now();

I use the following PG driver: postgresql-9.4.1212

I execute the statment as prepared statement.

Multiple calls of the above mentioned prepared statements always return the same value, so the query seems to be cached somewhere/somehow.

How could I accomplish that the query gets executed physically on the database every time?

user3193317
  • 131
  • 3
  • 14
  • 1
    Unrelated, but: `postgresql-9.4.1212` is a really, really old release. You should use a more up-to-date version of the driver –  Nov 07 '18 at 12:02

1 Answers1

1

I think you should consider using other functions, like statement_timestamp(). Please consider reading this question, that is somehow related to yours: now() default values are all showing same timestamp.

Tu.Ma.
  • 1,325
  • 10
  • 27