Re: 8.0.3 regexp_replace()... - Mailing list pgsql-general

From Tom Lane
Subject Re: 8.0.3 regexp_replace()...
Date
Msg-id 582.1138808010@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8.0.3 regexp_replace()...  ("rlee0001" <robeddielee@hotmail.com>)
List pgsql-general
"rlee0001" <robeddielee@hotmail.com> writes:
> My problem is with SUBSTRING. When it fails to find a match for the
> regexp pattern within the source string it returns NULL. Why?!

Because the SQL standard says so.

Of course, you're free to wrap the built-in function in your own
function that has behavior you like better for this case...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Help in compiling 8.1.2 from source
Next
From: Stephan Szabo
Date:
Subject: Re: 8.0.3 regexp_replace()...