Re: String function page incorrect?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: String function page incorrect?
Дата
Msg-id 26096.975625542@sss.pgh.pa.us
обсуждение исходный текст
Ответ на String function page incorrect?  ("Jonathan Ellis" <jellis@advocast.com>)
Список pgsql-sql
"Jonathan Ellis" <jellis@advocast.com> writes:
> I'm trying to find the correct function that returns the location of a
> substring within a string.  Looking at
> http://www.postgresql.org/docs/user/x2731.htm, it gives the Function name as
> "textpos" but in the Example column it uses "position".  But neither one
> works!

Yeah, that seems to be a few versions out of date :-(

The page should probably refer to "strpos", which is the true function
name:

play=> select strpos('high','ig');strpos
--------     2
(1 row)

You can also use the SQL92 POSITION syntax:

play=>  select position('ig' in 'high');strpos
--------     2
(1 row)

        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: I get an error with Foreign Keys
Следующее
От: Roberto Mello
Дата:
Сообщение: Re: String function page incorrect?