def METHOD_NAME(self):
    """
    Checks that tsquery characters are correctly escaped
    and do not generate a PostgreSQL syntax error.
    """
    # Simple quote should be escaped inside each tsquery term.
    results = self.backend.search("L'amour piqué par une abeille", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    results = self.backend.search("'starting quote", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    results = self.backend.search("ending quote'", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    results = self.backend.search("double quo''te", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    results = self.backend.search("triple quo'''te", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    # Now suffixes.
    results = self.backend.search("Something:B", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    results = self.backend.search("Something:*", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    results = self.backend.search("Something:A*BCD", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    # Now the AND operator.
    results = self.backend.search("first & second", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    # Now the OR operator.
    results = self.backend.search("first | second", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    # Now the NOT operator.
    results = self.backend.search("first & !second", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])
    # Now the phrase operator.
    results = self.backend.search("first <-> second", models.Book)
    self.assertUnsortedListEqual([r.title for r in results], [])