Search Postgresql Archives

Request to add feature to the Position function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
position(substring in string)
as listed here:
https://www.postgresql.org/docs/9.1/static/functions-string.html
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux