在PostgreSQL中运行简单的关联查询时您好
select
corr(m07_selling_price_total_usd, m12_amount_of_commission_earned_usd)
from order;我得到以下错误:
ERROR: function corr(double precision, double precision) does not exist
你有什么办法解决这个问题吗?这两个变量都是双精度的,因此根据文档(http://www.postgresql.org/docs/9.4/static/functions-aggregate.html),它应该可以工作。
发布于 2016-04-25 00:47:18
由于corr是从PostgreSQL 8.2开始出现的,所以我猜你的search_path配置很糟糕。
这个配置告诉PostgreSQL在使用无模式前缀的对象时在哪里查找。
如果您显式地指定模式(我使用\df corr发现此函数位于pg_catalog中),那么它应该可以工作。
select
pg_catalog.corr(m07_selling_price_total_usd, m12_amount_of_commission_earned_usd)
from "order";https://stackoverflow.com/questions/36825594
复制相似问题