BUG #18765: Inconsistent behaviour and errors with LIKE

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18765: Inconsistent behaviour and errors with LIKE
Дата
Msg-id 18765-6c26d2047e6f5143@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18765: Inconsistent behaviour and errors with LIKE
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18765
Logged by:          Anmol Mohanty
Email address:      anmol.mohanty@salesforce.com
PostgreSQL version: 17.0
Operating system:   NA(used fiddle tool at sqlfiddle.com)
Description:

select 'a\' like 'a\'; -- error - LIKE pattern must not end with escape
character
select 'a' like 'a\'; -- f - query runs
This doesn't make sense. The LIKE pattern is incorrect in both. 

I've also checked around constant folding and runtime non-literal values by
inserting into cte's and temp tables. Same outcome.

```
WITH a AS (SELECT 'xyz' AS value)
SELECT value LIKE 'xyz\' AS result
FROM a;
```
f


В списке pgsql-bugs по дате отправления: