| От | Tom Lane |
|---|---|
| Тема | Re: Position() Bug ? In PostgreSQL 9.2 |
| Дата | |
| Msg-id | 23390.1367502578@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Position() Bug ? In PostgreSQL 9.2 (dinesh kumar <dineshkumar02@gmail.com>) |
| Ответы |
Re: Position() Bug ? In PostgreSQL 9.2
|
| Список | pgsql-general |
dinesh kumar <dineshkumar02@gmail.com> writes:
> postgres=# select position('' in 'PostgreSQL'); *// position(Substring as
> an empty string) is returning 1.*
> position
> ----------
> 1
> (1 row)
This is correct according to the SQL standard:
<position expression> determines the first position, if any, at
which one string, S1, occurs within another, S2. If S1 is of length
zero, then it occurs at position 1 (one) for any value of S2. If S1
does not occur in S2, then zero is returned.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера