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

Re: [INTERFACES] selectecting not null varchars.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)p1(dot)selectacast(dot)net>
Cc: "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] selectecting not null varchars.
Date: 2000-02-24 22:23:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Joseph Shraibman <jks(at)p1(dot)selectacast(dot)net> writes:
> select * from directory where h != null AND length(h) > 0 ;

The correct, SQL92-approved spelling for this condition is


We also accept the abbreviation "h NOTNULL", although that's not a
standard AFAIK.  And of course you could do "NOT(h IS NULL)".

Certain Microsoft products that have difficulty grasping the concept of
NULL allow you to write these conditions with "=" or "!=", but in fact
any ordinary comparison operator should yield NULL out if either input
is NULL, so Microsoft is violating the letter and spirit of the spec by
accepting that.

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: Ed LoehrDate: 2000-02-24 23:50:21
Subject: Re: [INTERFACES] selectecting not null varchars.
Previous:From: Joseph ShraibmanDate: 2000-02-24 21:46:47
Subject: Re: [INTERFACES] selectecting not null varchars.

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