Re: Oracle porting sample instr function

Поиск
Список
Период
Сортировка
От Roberto Mello
Тема Re: Oracle porting sample instr function
Дата
Msg-id CAKz==bJ7oZi33-BJ548tuPTaYhrV+QpJtJQXEGTsHK48VkCtkg@mail.gmail.com
обсуждение исходный текст
Ответ на Oracle porting sample instr function  (Greg Smith <greg@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Jul 2, 2012 at 8:51 PM, Greg Smith <greg@2ndquadrant.com> wrote:
>

<snip>

> The INSTR implementation in the docs will instead search backwards from the
> end of the string if you tell it to start at 0, same as if you gave it a
> negative input.  I think it's therefore possible to get the plpgsql version
> to return a value in cases Oracle would instead return 0.  Seems like a
> straightforward thing to confirm and change the sample to do differently;
> just have to add an explicit test for a 0 value of beg_index.

I wrote that sample eons ago with the plpgsql-porting doc. I probably
overlooked the 0 behavior. Thanks for reporting Greg, and thanks Albe
for providing a patch.

Roberto


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Incorrect behaviour when using a GiST index on points
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Event Triggers reduced, v1