input: Write a function to add and retrieve books from a PostgreSQL database using psycopg2.
  assert addBook("1984", "George Orwell") is None
  assert addBook("To Kill a Mockingbird", "Harper Lee") is None
  assert viewBooks() == [('The Catcher in the Rye', 'J.D. Salinger'), ('1984', 'George Orwell'), ('To Kill a Mockingbird', 'Harper Lee')]
  assert viewBook("1984") == ('1984', 'George Orwell')
  assert viewBook("To Kill a Mockingbird") == ('To Kill a Mockingbird', 'Harper Lee')
output: import psycopg2
  
  def create_connection():
      connection = psycopg2.connect(
          dbname="your_db_name",
          user="your_db_user",
          password="your_db_password",
          host="your_db_host",
          port="your_db_port"
      )
      return connection
  
  def create_table():
      connection = create_connection()
      cursor = connection.cursor()
      cursor.execute("""
      CREATE TABLE IF NOT EXISTS books (
          id SERIAL PRIMARY KEY,
          title VARCHAR(255) NOT NULL,
          author VARCHAR(255) NOT NULL
      )
      """)
      connection.commit()
      cursor.close()
      connection.close()
  
  def addBook(title, author):
      connection = create_connection()
      cursor = connection.cursor()
      cursor.execute("INSERT INTO books (title, author) VALUES (%s, %s)", (title, author))
      connection.commit()
      cursor.close()
      connection.close()
  
  def viewBooks():
      connection = create_connection()
      cursor = connection.cursor()
      cursor.execute("SELECT title, author FROM books")
      books = cursor.fetchall()
      cursor.close()
      connection.close()
      return books
  
  def viewBook(title):
      connection = create_connection()
      cursor = connection.cursor()
      cursor.execute("SELECT title, author FROM books WHERE title = %s", (title,))
      book = cursor.fetchone()
      cursor.close()
      connection.close()
      return book
  
  create_table()