method

psql_env

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: PostgreSQLDatabaseTasks
psql_env() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/tasks/postgresql_database_tasks.rb, line 106
        def psql_env
          {}.tap do |env|
            env["PGHOST"]         = db_config.host                        if db_config.host
            env["PGPORT"]         = configuration_hash[:port].to_s        if configuration_hash[:port]
            env["PGPASSWORD"]     = configuration_hash[:password].to_s    if configuration_hash[:password]
            env["PGUSER"]         = configuration_hash[:username].to_s    if configuration_hash[:username]
            env["PGSSLMODE"]      = configuration_hash[:sslmode].to_s     if configuration_hash[:sslmode]
            env["PGSSLCERT"]      = configuration_hash[:sslcert].to_s     if configuration_hash[:sslcert]
            env["PGSSLKEY"]       = configuration_hash[:sslkey].to_s      if configuration_hash[:sslkey]
            env["PGSSLROOTCERT"]  = configuration_hash[:sslrootcert].to_s if configuration_hash[:sslrootcert]
          end
        end
Register or log in to add new notes.