Re: regex (not) matching null string - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: regex (not) matching null string
Date
Msg-id 20020621115533.N293-100000@megazone23.bigpanda.com
Whole thread Raw
In response to regex (not) matching null string  ("David M. Kaplan" <dmkaplan@ucdavis.edu>)
List pgsql-bugs
On Wed, 19 Jun 2002, David M. Kaplan wrote:

> I have found that !~ and !~* do not match the null string even when one
> would expect them to.  I am not sure if this is how it is supposed to
> work or if this is an error.  If this is how it works, I can't figure
> out where it is states in the documentation.

I think it's probably working correctly.  NULL is an unknown value,
you can't necessarily know whether or not it'll match the pattern so
you should get an unknown back in both cases since NOT unknown is
itself unknown.

pgsql-bugs by date:

Previous
From: Michael Meskes
Date:
Subject: Re: ECPG: CREATE TABLE ... FOREIGN KEY(col) REFERENCES table(col)
Next
From: Tom Lane
Date:
Subject: Re: regex (not) matching null string