input: Write a function to refresh a given table of data in a PostgreSQL database every 5 minutes. If the table is not specified, raise a ValueError.
  
  import psycopg2
  from datetime import datetime, timedelta
  import schedule
  import time
  
  conn = psycopg2.connect(
   host="localhost", 
   database="db", 
   user="user", 
   password="password"
  )
  
  def refresh_table(table_name):
   if not table_name:
   raise ValueError("Table name must be specified.")
   cur = conn.cursor()
   query = f'REFRESH TABLE "{table_name}";'
   cur.execute(query)
   conn.commit()
  
  # run the refresh_data job every 5 minutes
  schedule.every(5).minutes.do(lambda: refresh_table("TableName"))
  
  while True:
   schedule.run_pending()
   time.sleep(1)
  
  assert refresh_table("TableName")==None
  assert refresh_table("OtherTable")==None
  assert refresh_table("")==ValueError
  assert refresh_table("ValidTable")==None
output: 
  def refresh_table(table_name):
      if not table_name:
          raise ValueError("Table name must be specified.")
      cur = conn.cursor()
      query = f'REFRESH TABLE "{table_name}";'
      cur.execute(query)
      conn.commit()
  