H2 postgresql 方言不能与 using 关键字一起使用
我正在尝试将 postgres 数据库中的 text
类型列转换为 oid
类型,如下所示
ALTER TABLE person ALTER COLUMN id TYPE oid USING id::oid; <--works in postgresql
但我们使用 h2
进行测试 < code>postgresql dialect 并且它不喜欢 using
键。如果我删除 using
关键字,则查询可以在 h2
中工作,但不能在 postgres
中
ALTER TABLE person ALTER COLUMN id TYPE oid; <--works in h2
工作 问题
- 任何方式我都可以在没有
的情况下在 postgresql 中进行此转换using
关键字 - 或者有什么方法可以让 h2 识别
using
关键字?
I am trying to cast a text
type column in my postgres database to oid
type with something like this
ALTER TABLE person ALTER COLUMN id TYPE oid USING id::oid; <--works in postgresql
But we use h2
for our testing with postgresql dialect
and it is not liking the using
key. If I remove the using
keyword the query works in h2
but not in postgres
ALTER TABLE person ALTER COLUMN id TYPE oid; <--works in h2
Questions
- Any way I can do this casting in postgresql without
using
keyword - OR any way I can make h2 recognize
using
keyword ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 此 提交看起来像是对
using< 的支持/code> 关键字在以下版本中添加
As per this commit looks like support for
using
keyword was added in following versions