TODAY I LEARNED

Getting Postgres version using rails console

If you are not sure what PG version your environment is using, execute this in the rails console:

ActiveRecord::Base.connection.select_value('SELECT version()')

Tweet

Learned by Edwin Cruz on Feb 11, 2021

Discover our latest blog posts
  • #workflow
  • view raw
  • permalink
  • 1 likes
previous TIL next TIL
  • Log in
  • ?

    TIL is an open-source project by MagmaLabs that exists to catalogue the sharing & accumulation of knowledge as it happens day-to-day. Posts have a 200-word limit, and posting is open to any MagmaLaber as well as selected friends of MagmaLabs. We hope you enjoy learning along with us.

    • /wearemagmalabs
  • statistics
  • search
  • Twitter