title: pg gem: 'Warning: no type cast defined for type "numeric" '
body: <p>I'm having trouble getting typed results out of the pg gem.</p>
  
  <pre><code>require 'pg'                                                            
  require_relative 'spec/fixtures/database'                               
  
  client = PG.connect( DB[:pg] )                                            
  client.type_map_for_queries = PG::BasicTypeMapForQueries.new(client)    
  client.type_map_for_results = PG::BasicTypeMapForResults.new(client)    
  
  client.exec( %|select * from testme;| ) do |query|                        
    query.each {|r| puts r.inspect }                                      
  end
  </code></pre>
  
  <p>This program gives the output:</p>
  
  <pre><code>Warning: no type cast defined for type "money" with oid 790. Please cast this type explicitly to TEXT to be safe for future changes.
  Warning: no type cast defined for type "numeric" with oid 1700. Please cast this type explicitly to TEXT to be safe for future changes.
  {"string"=&gt;"thing", "logical"=&gt;true, "cash"=&gt;"£1.23", "reel"=&gt;"2.34", "day"=&gt;#&lt;Date: 2015-12-31 ((2457388j,0s,0n),+0s,2299161j)&gt;, "float"=&gt;3.45}
  </code></pre>
  
  <p>So: booleans and floats and dates (and integers) get converted, but not numerics or the money type.</p>
  
  <p>Can anyone tell me how to "cast the type explicitly", assuming that I don't want to hard-code a solution for each table?</p>