postgresql - 我无法完成请求,我该怎么办?
问题描述
如何修复该错误(我的代码包含 3 个文件https://github.com/CraigTyle/Mathexp):
test=# select test.complex_Dispersion(c) from t;
ERROR: function sqr_complex(test.complex) does not exist
LINE 1: SELECT (sqr_complex(comp))
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT (sqr_complex(comp))
CONTEXT: PL/pgSQL function dispersion(sqr_complex,complex) line 7 at assignment
但是,如果我们使用没有“测试”的命令,那么它就可以工作: 看图片
解决方案
模式test
必须在 your 中search path
,否则对对象的每个引用都必须是模式限定的,包括在函数中
您可以通过更改用户来永久添加路径。
ALTER USER username SET search_path TO "$user", public, test;
由于上一条命令只在下次登录时生效,您可以通过应用立即应用
SET search_path TO "$user", public, test;
推荐阅读
- html - 如何使用iconsax CSS3 图标?
- python - 如何以 10H:30M 格式获取时间,小时和分钟应该用 H 和 M 表示 - Python
- markdown - 盖茨比无法查询frontmatter
- javascript - 在不允许使用 CSS 类的 HTML 编辑器中使用 CSS
- python - 每次打开应用程序时如何运行代码行
- javascript - html2canvas 图像从左侧切出,边距和空白在右侧
- reactjs - 无法在我的反应 js 应用程序中执行 PUT 请求
- typescript - 在 Typescript 中将参数声明为 Type 的目的
- linux - JMeter Perfmon 中的连接超时错误
- ios - UICollectionViewCell 可见时仍在配置