Re: maybe incorrect regexp_replace behavior in v8.3.4 ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: maybe incorrect regexp_replace behavior in v8.3.4 ?
Date: 2012-05-16 14:15:45
Message-ID: 24763.1337177745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> writes:
> bi_hsx_a0_latest=# select regexp_replace('xxx','^xxxy$',null);
> regexp_replace
> ----------------
>
> (1 row)
> But why did it return null in this case?

regexp_replace is strict, so it never even gets called when there's
a null input.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-05-16 14:31:38 Re: Slow queries when functions are inlined
Previous Message Richard Huxton 2012-05-16 14:14:06 Re: maybe incorrect regexp_replace behavior in v8.3.4 ?