Re: regexp on null - Mailing list pgsql-general

From Richard Broersma
Subject Re: regexp on null
Date
Msg-id AANLkTimp1xrMXTUKMBs2ESr0z-KtTJamvA7E2K6SwE-Y@mail.gmail.com
Whole thread Raw
In response to regexp on null  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Responses Re: regexp on null
List pgsql-general
On Fri, Sep 10, 2010 at 9:00 AM, Gauthier, Dave <dave.gauthier@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' ) IS UNKNOWN
 might work.


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-general by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: regexp on null
Next
From: "Gauthier, Dave"
Date:
Subject: Re: regexp on null