module ActiveRecord::PostgreSQLExtensions
Constants
- VERSION
Public Class Methods
SERVER_VERSION()
click to toggle source
# File lib/activerecord-postgresql-extensions.rb, line 7 def SERVER_VERSION return @SERVER_VERSION if defined?(@SERVER_VERSION) @SERVER_VERSION = if (version_string = ::ActiveRecord::Base.connection.select_rows("SELECT pg_catalog.version()").flatten.first).present? version_string =~ /^\s*PostgreSQL\s+([^\s]+)/ $1 end end