<div><div dir="rtl"><div>
<div>Here is a refer to the stackoverflow question:<br><br></div>
<div><a href="http://stackoverflow.com/questions/42974822/find-sub-string-position-from-the-end-of-string-in-postgresql">http://stackoverflow.com/questions/42974822/find-sub-string-position-from-the-end-of-string-in-postgresql</a></div>
<div> </div>
<div>it carry another example and the solution however I still think that this fuctionality should be avliable in a build-in postgresql function.</div>
<div> </div>
<br><br></div></div><section class="cust_msg_end"></section><blockquote style="margin:0;margin-bottom:20px;border-top:1px solid #e0e0e0;"><br>ב מרץ 27, 2017 19:58, Adrian Klaver כתב:<blockquote style="margin:0;margin-bottom:20px;border-top:1px solid #e0e0e0">On 03/27/2017 09:15 AM, David G. Johnston wrote:<br>> On Mon, Mar 27, 2017 at 9:03 AM, Brian Dunavant <brian(at)omniti(dot)com<br>> <mailto:brian(at)omniti(dot)com>>wrote:<br>><br>> That does not return the correct answer for the original poster's<br>> request.<br>><br>> flpg=#<br>> <br>> select position('om' in reverse('Tomomasaaaaaaaaaaa'));<br>> position<br>> ----------<br>> 15<br>> (1 row)<br>><br>><br>> Easy oversight to make - if you reverse the string being searched you<br>> must also reverse the string that you are looking for.<br>><br>> That said the OP hasn't actually defined what they mean by "locate" when<br>> considered in a backward sense - some length adjustments might be needed<br>> to compensate for the length of the term being searched for.<br><br>I think there is also a RTL language involved, so we may need more <br>information to answer the question.<br><br>><br>> Patches are welcomed. Given the lack of any links to previous requests<br>> of this nature I'd say its not exactly a highly in-demand capability.<br>><br>> David J.<br>><br><br><br>-- <br>Adrian Klaver<br>adrian(dot)klaver(at)aklaver(dot)com<br><br></mailto:brian(at)omniti(dot)com></brian(at)omniti(dot)com<br><br></blockquote></blockquote><br></div>