Re: 8.0.3 regexp_replace()...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "rlee0001" <robeddielee(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 8.0.3 regexp_replace()...
Date: 2006-02-01 15:33:30
Message-ID: 582.1138808010@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"rlee0001" <robeddielee(at)hotmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2006-02-01 16:00:30 Re: 8.0.3 regexp_replace()...
Previous Message Tom Lane 2006-02-01 15:30:29 Re: Help in compiling 8.1.2 from source