Re: [HACKERS] regexp_replace( , , , NULL ) returns null?

2014-05-05 Thread Jim Nasby
On 5/2/14, 8:57 PM, Tom Lane wrote: Jim Nasby jna...@enova.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

[HACKERS] regexp_replace( , , , NULL ) returns null?

2014-05-02 Thread Jim Nasby
Is there any particular reason for this: decibel@decina.local=# SELECT regexp_replace( 'a', 'a', 'b', null ) IS NULL; ?column? -- t (1 row) ISTM it’d be a lot better if it treated NULL flags the same as ‘’... -- Jim Nasby, Lead Data Architect (512) 569-9461 -- Sent via

Re: [HACKERS] regexp_replace( , , , NULL ) returns null?

2014-05-02 Thread Tom Lane
Jim Nasby jna...@enova.com writes: Is there any particular reason for this: decibel@decina.local=# SELECT regexp_replace( 'a', 'a', 'b', null ) IS NULL; ?column? -- t (1 row) Yeah: regexp_replace is strict. ISTM it’d be a lot better if it treated NULL flags the same as ‘’...