class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool

:nodoc:

def dealloc(key)

def dealloc(key)
  # This is ugly, but safe: the statement pool is only
  # accessed while holding the connection's lock. (And we
  # don't need the complication of with_raw_connection because
  # a reconnect would invalidate the entire statement pool.)
  if conn = @connection.instance_variable_get(:@raw_connection)
    conn.query "DEALLOCATE #{key}" if conn.status == PG::CONNECTION_OK
  end
rescue PG::Error
end

def initialize(connection, max)

:nodoc:
def initialize(connection, max)
  super(max)
  @connection = connection
  @counter = 0
end

def next_key

def next_key
  "a#{@counter += 1}"
end