Position() Bug ? In PostgreSQL 9.2

Поиск
Список
Период
Сортировка
От dinesh kumar
Тема Position() Bug ? In PostgreSQL 9.2
Дата
Msg-id CALnrH7rO0WYKK2aHTWLKwKjOy08Tqf8PSiz_07LHp05OKmVZmw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Position() Bug ? In PostgreSQL 9.2  (Amit Langote <amitlangote09@gmail.com>)
Re: Position() Bug ? In PostgreSQL 9.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello Team,

I would like to know whether the following behavior is a BUG or an expected behavior. If this is a duplicated case, then kindly ignore.

postgres=# SELECT version();
                           version
-------------------------------------------------------------
 PostgreSQL 9.2.3, compiled by Visual C++ build 1600, 32-bit
(1 row)


postgres=# select position('P' in 'PostgreSQL');
 position
----------
        1
(1 row)


postgres=# select position('' in 'PostgreSQL'); // position(Substring as an empty string) is returning 1.
 position
----------
        1
(1 row)

Kindly let me know, if anything i miss here.

Regards,
Dinesh

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

Предыдущее
От: dinesh kumar
Дата:
Сообщение: Re: PostgreSQL registry entries for apt-get/yum/rpm install
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Position() Bug ? In PostgreSQL 9.2