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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, lockhart(at)fourpalms(dot)org
Subject: Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function
Date: 2002-08-14 06:23:42
Message-ID: 5538.1029306222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Joe Conway <mail(at)joeconway(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2002-08-14 06:31:17 Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function
Previous Message Joe Conway 2002-08-14 06:15:25 Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-08-14 06:31:17 Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function
Previous Message Joe Conway 2002-08-14 06:15:25 Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-08-14 06:31:17 Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function
Previous Message Joe Conway 2002-08-14 06:15:25 Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function