postgresql - 通过matlab执行postgresql命令
问题描述
我正在尝试通过 matlab 脚本在 PostgreSQL 中运行这行代码:
SELECT to_tsvector('english', 'a fat cat sat on a mat - it ate a fat rats');
并得到这个结果:
'ate':9 'cat':3 'fat':2,11 'mat':7 'rat':12 'sat':4
matlab脚本如下:
conn = database('servername','username','password');
query = "SELECT to_tsvector('english', 'a fat cat sat on a mat - it ate a fat rats');
to_tsvector";
display(query)
data = fetch(conn,query);
close(conn)
当我在 matlab 中运行它时,出现以下错误:
JDBC Driver Error: ERROR: syntax error at or near "to_tsvector"
Position: 2
我不确定如何修复它,我需要能够通过 matlab 运行它。任何人都可以分享见解吗?
解决方案
推荐阅读
- postgresql - Yii2:在迁移中向 PostgreSQL 添加只读用户
- javascript - 如何使用 YouTube IFrame Player API 收听时间变化事件?
- actions-on-google - 向需要身份验证的第 3 方发出 API 请求
- sql - 在一张表中显示多个数据库表
- sql - Access 中的 UPDATE 表从 Excel 范围获取数据
- graphql - Gatsby & Graphql:过滤 allMarkdownRemark 以查找匹配变量的页面
- openvpn - Netgate pfSense 无法从 OpenVPN 访问某些 IP
- python - AttributeError: 'list' 对象属性 'append' 是只读的
- docker - 有没有办法让 docker 容器等待外部调用?
- arrays - 有没有一种算法可以将二维数组的子网格的值存储到一个新的二维数组中?