collation()
Returns the current database collation.
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 272 def collation select_value("SELECT datcollate FROM pg_database WHERE datname LIKE '#{current_database}'", 'SCHEMA') end