vendor/bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb
# Maps PostgreSQL-specific data types to logical Rails types.
Maps PostgreSQL-specific data types to logical Rails types.
Maps PostgreSQL - specific data types to logical Rails types .
def simplified_type(field_type)
          case field_type
          when /^(?:real|double precision)$/
            :float
          when 'money'
            :decimal
          when 'hstore'
            :hstore
          when 'ltree'
            :ltree
          when 'inet'
            :inet
          when 'cidr'
            :cidr
          when 'macaddr'
            :macaddr
          when /^(?:character varying|bpchar)(?:\(\d+\))?$/
            :string
          when 'bytea'
            :binary
          when /^timestamp with(?:out)? time zone$/
            :datetime
          when /^interval(?:|\(\d+\))$/
            :string
          when /^(?:point|line|lseg|box|"?path"?|polygon|circle)$/
            :string
          when /^bit(?: varying)?(?:\(\d+\))?$/
            :string
          when 'xml'
            :xml
          when 'tsvector'
            :tsvector
          when /^\D+\[\]$/
            :string
          when 'oid'
            :integer
          when 'uuid'
            :uuid
          when 'json'
            :json
          when /^(?:small|big)int$/
            :integer
          when /(num|date|tstz|ts|int4|int8)range$/
            field_type.to_sym
          else
            super
          end
        end
def simplified_type ( field_type ) case field_type when / ^(?:real|double precision)$ / :float when 'money' :decimal when 'hstore' :hstore when 'ltree' :ltree when 'inet' :inet when 'cidr' :cidr when 'macaddr' :macaddr when / ^(?:character varying|bpchar)(?: \( \d + \) )?$ / :string when 'bytea' :binary when / ^timestamp with(?:out)? time zone$ / :datetime when / ^interval(?:| \( \d + \) )$ / :string when / ^(?:point|line|lseg|box|"?path"?|polygon|circle)$ / :string when / ^bit(?: varying)?(?: \( \d + \) )?$ / :string when 'xml' :xml when 'tsvector' :tsvector when / ^ \D + \[ \] $ / :string when 'oid' :integer when 'uuid' :uuid when 'json' :json when / ^(?:small|big)int$ / :integer when / (num|date|tstz|ts|int4|int8)range$ / field_type . to_sym else super end end
Maps PostgreSQL-specific data types to logical Rails types.
Maps PostgreSQL - specific data types to logical Rails types .
# Numeric and monetary types # Monetary types # Network address types # Character types # Binary data types # Date/time types # Geometric types # Bit strings # XML type # tsvector type # Arrays # Object identifier types # UUID type # JSON type # Small and big integer types # Pass through all types that are not specific to PostgreSQL.
field_type
<not_specific>