【问题标题】:is there a special Postgresql Bytea data type in Sequel?Sequel 中是否有特殊的 Postgresql Bytea 数据类型?
【发布时间】:2019-10-28 13:02:23
【问题描述】:

我知道 Sequel 有 BLOB 字节数据类型,但 BLOBbytea 之间存在一些差异。 Sequel 可以直接使用bytea 吗?

【问题讨论】:

  • 这样的问题也是 Sequel IRC 频道 (irc://irc.freenode.net/sequel) 和 Discussion Forum 的不错选择。 Sequel的作者使用PostgreSQL,对Sequel和PostgreSQL都了如指掌。

标签: ruby sequel bytea


【解决方案1】:
  • 是的。续集支持字节茶:见“The 2.2.0 release_notes.

  • 您可以使用以下方法将 col_name 列类型从 String 更改为 Bytea:

    set_column_type :col_name, :bytea, using: 'col_name::bytea'
    

【讨论】:

    猜你喜欢
    • 2021-02-24
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 1970-01-01
    • 2012-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多