| От | Tom Lane |
|---|---|
| Тема | Re: Split_Part w/negative integer does not work |
| Дата | |
| Msg-id | 2601206.1679763215@sss.pgh.pa.us обсуждение |
| Ответ на | Split_Part w/negative integer does not work (PG Doc comments form <noreply@postgresql.org>) |
| Список | pgsql-docs |
PG Doc comments form <noreply@postgresql.org> writes: > Page: https://www.postgresql.org/docs/15/functions-string.html > Documentation > split_part ( string text, delimiter text, n integer ) → text > Splits string at occurrences of delimiter and returns the n'th field > (counting from one), or when n is negative, returns the |n|'th-from-last > field. > split_part('abc~@~def~@~ghi', '~@~', 2) → def > split_part('abc,def,ghi,jkl', ',', -2) → ghi > Observation > SELECT split_part('abc,def,ghi,jkl', ',', -1); > generates > ERROR: field position must be greater than zero > SQL state: 22023 Apparently, you are reading the v15 documentation and expecting it to be exactly correct for some older server version. The described behavior came in in v14. regards, tom lane
В списке pgsql-docs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера