Position() Bug ? In PostgreSQL 9.2

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Position() Bug ? In PostgreSQL 9.2
Дата
Msg-id CA+HiwqGtPyWvrFq0jD6rh7XmGMstCQBrkSrHBBz=Nd9yK-QcwQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
This behavior is similar to strstr(3) ('needle in a haystack'
substring locating C function).
which is,

char *strstr(const char *haystack, const char *needle)

which returns haystack (that is main string) if needle (string to be
located) is empty.

Assuming position() tries to do something similar, it returns first
index (which is 1) of the main string (haystack!). Although this does
not answer if it's a bug or not, I tend to think it is deliberate.

--

Amit Langote


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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: LONG delete with LOTS of FK's
Следующее
От: roshan2013
Дата:
Сообщение: Re: Save postgresql node to catch only DML except delete queries