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

Re: regex (not) matching null string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 19:01:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"David M. Kaplan" <dmkaplan(at)ucdavis(dot)edu> writes:
> I have found that !~ and !~* do not match the null string even when one 
> would expect them to.

NULL strings won't match anything.  I can't tell whether your row 3 is
an empty string or a NULL --- but if it's a NULL, this behavior is
not a bug.  Try "s IS NULL" if you want to find NULLs.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-06-21 19:32:30
Subject: Re: I have problem with pg_dump in PostgreSQL 7.1.2
Previous:From: Stephan SzaboDate: 2002-06-21 18:58:04
Subject: Re: regex (not) matching null string

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