Changeset 3195
- Timestamp:
- 11/28/05 21:46:34 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r3194 r3195 1 1 *SVN* 2 2 3 * MySQL : active? compatibility with the pure-Ruby driver. #428 [Jeremy Kemper]3 * MySQL and PostgreSQL: active? compatibility with the pure-Ruby driver. #428 [Jeremy Kemper] 4 4 5 5 * Oracle: active? check pings the database rather than testing the last command status. #428 [Michael Schoen] trunk/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
r3165 r3195 58 58 # Is this connection alive and ready for queries? 59 59 def active? 60 # TODO: postgres-pr doesn't have PGconn#status.61 60 if @connection.respond_to?(:status) 62 @connection.status != PGconn::CONNECTION_BAD61 @connection.status == PGconn::CONNECTION_OK 63 62 else 63 @connection.query 'SELECT 1' 64 64 true 65 65 end 66 rescue PGError 67 false 66 68 end 67 69