input: Write a function to create a Python script that refreshes a given table of data in a PostgreSQL database every 5 minutes. The function should take the table name, database connection details, and the refresh interval as input parameters.
  
  
  def refresh_database_table(table_name, db_host, db_name, db_user, db_password, refresh_interval=5):
      import psycopg2
      from datetime import datetime, timedelta
      import schedule
      import time
  
      conn = psycopg2.connect(
          host=db_host, 
          database=db_name, 
          user=db_user, 
          password=db_password
      )
  
      def refresh_data():
          cur = conn.cursor()
          query = f'REFRESH TABLE "{table_name}";'
          cur.execute(query)
          conn.commit()
  
      # run the refresh_data job every refresh_interval minutes
      schedule.every(refresh_interval).minutes.do(refresh_data)
  
      while True:
          schedule.run_pending()
          time.sleep(1)
  
  # Test cases
  refresh_database_table("TableName", "localhost", "db", "user", "password")
  refresh_database_table("AnotherTable", "localhost", "db", "user", "password")
  refresh_database_table("TestTable", "127.0.0.1", "testdb", "testuser", "testpassword", 10)
  
output: def refresh_database_table(table_name, db_host, db_name, db_user, db_password, refresh_interval=5):
      import psycopg2
      import schedule
      import time
  
      conn = psycopg2.connect(
          host=db_host, 
          database=db_name, 
          user=db_user, 
          password=db_password
      )
  
      def refresh_data():
          cur = conn.cursor()
          query = f'REFRESH MATERIALIZED VIEW "{table_name}";'
          cur.execute(query)
          conn.commit()
  
      schedule.every(refresh_interval).minutes.do(refresh_data)
  
      while True:
          schedule.run_pending()
          time.sleep(1)