Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function
Дата
Msg-id
5538.1029306222@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() Joe Conway <mail@joeconway.com>
Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() Bruce Momjian <pgman@candle.pha.pa.us>
Joe Conway  writes:
> The only remaining problem is that this causes opr_sanity to fail based
> on this query: ...
> This fails because I implemented text_substr() and bytea_substr() to
> take either 2 or 3 args. This was necessary for SQL92 spec compliance.

Rather than loosening the opr_sanity test, I'd suggest setting this
up as two separate builtin functions.  They can call a common
implementation routine if you like.  But a runtime test on the number
of arguments doesn't offer any attractive improvement.

> I'm planning to take on the replace function next.

Isn't Gavin on that already?

			regards, tom lane
В списке pgsql-patches по дате отправления
От: Joe Conway
Дата:
От: Joe Conway
Дата:
FAQ