# Hibernates adds \`escape ''\` to LIKE in PostgreSQL

**URL:** <https://discourse.hibernate.org/t/hibernates-adds-escape-to-like-in-postgresql/9914>\
**Category:** Hibernate ORM\
**Created:** [July 8, 2024, 5:09pm UTC](https://discourse.hibernate.org/t/hibernates-adds-escape-to-like-in-postgresql/9914 "2024-07-08T17:09:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [July 9, 2024, 1:53pm UTC](https://discourse.hibernate.org/t/hibernates-adds-escape-to-like-in-postgresql/9914/2 "2024-07-09T13:53:03Z")

</div>

This was discussed multiple times already. Please read through existing discussions:

- [It is necessary to write redundant "ESCAPE '\'" after every LIKE expression](https://discourse.hibernate.org/t/it-is-necessary-to-write-redundant-escape-after-every-like-expression/9079)
- [Incorrect escape '' added to SQL for H2 in Oracle Mode](https://discourse.hibernate.org/t/incorrect-escape-added-to-sql-for-h2-in-oracle-mode/8372)
- [Erroneous " escape '\' " being added to generated SQL with a JpaRepository findAll(Example)](https://discourse.hibernate.org/t/erroneous-escape-being-added-to-generated-sql-with-a-jparepository-findall-example/9353)
- [Why does Hibernate 6 automatically escape backslashes when rendering LIKE predicates?](https://discourse.hibernate.org/t/why-does-hibernate-6-automatically-escape-backslashes-when-rendering-like-predicates/7420)

---

_[View the full topic](https://discourse.hibernate.org/t/hibernates-adds-escape-to-like-in-postgresql/9914)._
