From: | Jim Nasby <jnasby(at)enova(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: regexp_replace( , , , NULL ) returns null? |
Date: | 2014-05-05 17:11:38 |
Message-ID: | 5367C64A.9000407@enova.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 5/2/14, 8:57 PM, Tom Lane wrote:
> Jim Nasby <jnasby(at)enova(dot)com> writes:
>> ISTM it’d be a lot better if it treated NULL flags the same as ‘’...
>
> In Oracle's universe that probably makes sense, but to me it's not
> sensible. Why should "unknown" flags produce a non-unknown result?
Only because they're more options than data.
> I find it hard to envision many use-cases where you wouldn't actually
> have the flags as a constant, anyway; they're too fundamental to the
> behavior of the function.
Unless you're wrapping this function; handling the case of the flags being optional becomes easier then.
(FWIW, I'm creating a version that accepts an array of search/replace arguments.)
--
Jim Nasby, Lead Data Architect (512) 569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2014-05-05 17:16:27 | Re: New and interesting replication issues with 9.2.8 sync rep |
Previous Message | Tom Lane | 2014-05-05 17:07:48 | Re: Cluster name in ps output |