Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql PgPreparedStatement和缓存_Sql_Postgresql_Jdbc - Fatal编程技术网

Sql PgPreparedStatement和缓存

Sql PgPreparedStatement和缓存,sql,postgresql,jdbc,Sql,Postgresql,Jdbc,我想通过以下查询从PostgreSQL数据库读取当前时间戳: select now(); 我使用以下PG驱动程序:postgresql-9.4.1212 我按照准备好的语句执行语句 上述准备语句的多个调用总是返回相同的值,因此查询似乎被缓存在某处 我怎样才能做到查询每次都在数据库上物理上执行?我认为你应该考虑使用其他函数,如代码> StestMyTimeStpP()/。 请考虑阅读这个问题,这与你的问题有关: .不相关,但是:postgresql-9.4.1212是一个非常非常古老的版本。您应

我想通过以下查询从PostgreSQL数据库读取当前时间戳:

select now();
我使用以下PG驱动程序:
postgresql-9.4.1212

我按照准备好的语句执行语句

上述准备语句的多个调用总是返回相同的值,因此查询似乎被缓存在某处


<>我怎样才能做到查询每次都在数据库上物理上执行?

我认为你应该考虑使用其他函数,如代码> StestMyTimeStpP()/<代码>。 请考虑阅读这个问题,这与你的问题有关:
.

不相关,但是:
postgresql-9.4.1212
是一个非常非常古老的版本。您应该使用更新版本的驱动程序