title: postgres query serialized yaml field
body: <p>I have a field in a database that is serialized (sadly) into Yaml.  </p>
  
  <p>Below is the field definition on the table:</p>
  
  <pre><code>  class Account &lt; Sequel::Model
      include ModelManager
  
      plugin :serialization
  
      serialize_attributes :yaml, :billing_info
  </code></pre>
  
  <p>I would really like to transform this into the new json type but we are still on postgres 9.2.6.</p>
  
  <p>Is there anyway that I can query this data until I can migrate it?  </p>
  
  <p>The field either contains an empty definition like this:</p>
  
  <pre><code>--- !ruby/object:BillingInfo {}
  </code></pre>
  
  <p>Or has data like this:</p>
  
  <pre><code>--- !ruby/object:BillingInfo
  gateway_identifier: blah 
  organisation: blah
  billing_email: blah
  reference: blah
  phone: blah
  country: blah
  vat: blah
  subscription: blah
  </code></pre>