Request to add feature to the Position function

Поиск
Список
Период
Сортировка
От Ron Ben
Тема Request to add feature to the Position function
Дата
Msg-id ~00258D92A374E6152001107@walla.co.il
обсуждение исходный текст
Ответы Re: Request to add feature to the Position function
Re: Request to add feature to the Position function
Список pgsql-general
Hi,
position(substring in string)
as listed here:
locates sub string in a string.
 
It doesn't support locateing the substring from the back.
 
For example:
 
position('om' in 'Tomomas')
gives 2
 
But if I want to locate the first occurance from the back of the string it's impossible/
 
My suggestion is to create a function 
position(substring in string,order)
where order can be: begin, end
 
and it will find the string according to this parameter.
This is pretty easy to implement and should be a part of the PostgreSQL tools.
 
similar fuctionality exists in trim function where user can specify leading or taling parameter

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

Предыдущее
От: Jiri Sadek
Дата:
Сообщение: Re: migration to 9.6 array_accum memory issues
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Request to add feature to the Position function