gpt4 book ai didi

postgresql - citusdb 错误 : ERROR: cannot execute PREPARE for a distributed query plan

转载 作者:行者123 更新时间:2023-11-29 12:37:42 24 4
gpt4 key购买 nike

我刚刚完成了 citusdb 教程。本地使用“psql”工作正常。但是,当我尝试使用 native postgres jdbc 执行相同的查询时,出现错误:

ERROR: ERROR: cannot execute PREPARE for a distributed query plan
Query = SELECT count(*) FROM customer_reviews

本地工作正常,

postgres=# SELECT count(*) FROM customer_reviews;

计数

589859(1 行)

http://www.citusdata.com/downloads

最佳答案

引用自Common Errors CitusDB 维基上的页面。

The most common cause for this error is that tools using ODBC/JDBC drivers typically try to use a PREPARE statement by default, which is currently unsupported by CitusDB. This can very easily be resolved by downgrading the JDBC or ODBC protocol version to avoid using PREPARE statements.

For ODBC drivers, depending on the particular driver/tool you are using there is sometimes an option to disable PREPARE statements. Alternatively, you could just revert the protocol to version 7.2 which is nearly always possible.

For JDBC drivers, the exact steps depend a bit more on the particular driver. But, you can almost always set protocolVersion as 2 either in the driver properties or by specifying it in the connection string.

关于postgresql - citusdb 错误 : ERROR: cannot execute PREPARE for a distributed query plan,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23901486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com