[GENERAL] regexp on null

2010-09-10 Thread Gauthier, Dave
8.3.4 on Linux Is there a way to regexp match on a null value? Or is it necessary to OR in a or x is null? Thanks in Advance !

Re: [GENERAL] regexp on null

2010-09-10 Thread Dmitriy Igrishin
Hey Dave, Did you consider to use coalesce() ? Regards, Dmitriy 2010/9/10 Gauthier, Dave dave.gauth...@intel.com 8.3.4 on Linux Is there a way to regexp match on a null value? Or is it necessary to OR in a or x is null? Thanks in Advance !

Re: [GENERAL] regexp on null

2010-09-10 Thread Richard Broersma
On Fri, Sep 10, 2010 at 9:00 AM, Gauthier, Dave dave.gauth...@intel.com wrote: Is there a way to regexp match on a null value? I would say no.   Or is it necessary to OR in a or x is null? you could use a COALESCE( text_column, '') ~ E'MyRegEx'; Or perhaps: ( text_column ~ E'MyRegEx'

Re: [GENERAL] regexp on null

2010-09-10 Thread Gauthier, Dave
! -Original Message- From: Richard Broersma [mailto:richard.broer...@gmail.com] Sent: Friday, September 10, 2010 12:19 PM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] regexp on null On Fri, Sep 10, 2010 at 9:00 AM, Gauthier, Dave dave.gauth...@intel.com wrote

Re: [GENERAL] regexp on null

2010-09-10 Thread Richard Broersma
On Fri, Sep 10, 2010 at 9:56 AM, Gauthier, Dave dave.gauth...@intel.com wrote: Ya, I kinda knew about these approaches.  The problem ahs to do with novice users who don't know about coalesce or or;ing a check ofr nulls.  I was hoping there was some special regexp expression that would match

Re: [GENERAL] regexp on null

2010-09-10 Thread David Fetter
On Fri, Sep 10, 2010 at 10:25:55AM -0700, Richard Broersma wrote: On Fri, Sep 10, 2010 at 9:56 AM, Gauthier, Dave dave.gauth...@intel.com wrote: Ya, I kinda knew about these approaches.  The problem ahs to do with novice users who don't know about coalesce or or;ing a check ofr nulls.  I

Re: [GENERAL] regexp on null

2010-09-10 Thread Dmitriy Igrishin
Agree with David. Regards, Dmitriy 2010/9/10 David Fetter da...@fetter.org On Fri, Sep 10, 2010 at 10:25:55AM -0700, Richard Broersma wrote: On Fri, Sep 10, 2010 at 9:56 AM, Gauthier, Dave dave.gauth...@intel.com wrote: Ya, I kinda knew about these approaches. The problem ahs to do