lib/pg_histogram/histogram.rb
# In case the column has an alias, the pure column is just the aliased name
# If expression is true, only the expression (before the 'AS') is returned
In case the column has an alias, the pure column is just the aliased name
If expression is true, only the expression (before the 'AS') is returned
In case the column has an alias the pure column is just the aliased name If expression is true only the expression ( before the ' AS ' ) is returned
def pure_column(expression = false)
      index = column =~ / as /i
      if index
        if expression
          column[0..index]
        else
          column[index + 4..-1]
        end
      else
        column
      end
    end
def pure_column ( expression = false ) index = column =~ /  as  /i if index if expression column [ 0 .. index ] else column [ index + 4 .. - 1 ] end else column end end
In case the column has an alias, the pure column is just the aliased name
If expression is true, only the expression (before the 'AS') is returned
In case the column has an alias the pure column is just the aliased name If expression is true only the expression ( before the ' AS ' ) is returned
# If AS is present, split and keep either side # Keep left side # Keep right side # Column was already good.
expression
<not_specific>