Skip site navigation (1) Skip section navigation (2)

Re: regex (not) matching null string

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "David M(dot) Kaplan" <dmkaplan(at)ucdavis(dot)edu>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: regex (not) matching null string
Date: 2002-06-21 18:58:04
Message-ID: 20020621115533.N293-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: 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.



In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-06-21 19:01:34
Subject: Re: regex (not) matching null string
Previous:From: Tom LaneDate: 2002-06-21 17:15:56
Subject: Re: WHERE <timestamp-val>=NULL malfunction in release 7.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group