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 establish a connection to the database, define a function to execute the refresh query, and use a scheduling library to run this function periodically. If the table name is provided, the function should refresh that table. If no table name is provided, the function should raise an error.
  
  assert refresh_table("TableName") == None
  assert refresh_table("") == "Error: No table name provided"
output: def refresh_table(table_name):
      if not table_name:
          return "Error: No table name provided"
      
      import psycopg2
      from apscheduler.schedulers.background import BackgroundScheduler
  
      def refresh_query():
          conn = psycopg2.connect(database="your_db", user="your_user", password="your_password", host="your_host", port="your_port")
          cursor = conn.cursor()
          cursor.execute(f"REFRESH MATERIALIZED VIEW {table_name};")
          conn.commit()
          cursor.close()
          conn.close()
  
      scheduler = BackgroundScheduler()
      scheduler.add_job(refresh_query, 'interval', minutes=5)
      scheduler.start()