Postgresql postgres查询序列化的yaml字段

Postgresql postgres查询序列化的yaml字段,postgresql,psql,Postgresql,Psql,我在数据库中有一个字段,它被序列化(不幸地)为Yaml 以下是表中的字段定义: class Account < Sequel::Model include ModelManager plugin :serialization serialize_attributes :yaml, :billing_info 或者有这样的数据: --- !ruby/object:BillingInfo {} --- !ruby/object:BillingInfo gat

我在数据库中有一个字段,它被序列化(不幸地)为Yaml

以下是表中的字段定义:

  class Account < Sequel::Model
    include ModelManager

    plugin :serialization

    serialize_attributes :yaml, :billing_info
或者有这样的数据:

--- !ruby/object:BillingInfo {}
--- !ruby/object:BillingInfo
gateway_identifier: blah 
organisation: blah
billing_email: blah
reference: blah
phone: blah
country: blah
vat: blah
subscription: blah

如果您是指PostgreSQL级别的查询,那么您必须添加自己的yaml解析器,使用类似plv8和js yaml的东西,如下所述: