On 03/27/2017 09:03 AM, Brian Dunavant wrote: That does not return the correct answer for the original poster's request. flpg=# select position('om' in reverse('Tomomasaaaaaaaaaaa')); position ---------- 15 (1 row) It shows the position counting back from the end. If you want counting from the front: aklaver@test=> select (length('Tomomasaaaaaaaaaaa')+ 1) - position('om' in reverse('Tomomasaaaaaaaaaaa')); ?column? ---------- 4
That does not return the correct answer for the original poster's request. flpg=# select position('om' in reverse('Tomomasaaaaaaaaaaa')); position ---------- 15 (1 row)
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных