Re: Differentiate Between Zero-Length String and NULLColumn Values

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Cc: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Subject: Re: Differentiate Between Zero-Length String and NULLColumn Values
Date: 2007-01-30 18:59:36
Message-ID: 200701301959.37775.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

D'Arcy J.M. Cain wrote:
> SELECT * FROM table WHERE column IS NULL;
> SELECT * FROM table WHERE column = NULL;
>
> The latter violates the SQL spec and is not allowed by PostgreSQL
> without setting a special flag.

It doesn't violate any spec and it's certainly allowed by PostgreSQL
without any flags. It's just that the result is not what some people
expect.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomas Vondra 2007-01-30 19:34:13 Re: Differentiate Between Zero-Length String and NULLColumn Values
Previous Message Ezequias Rodrigues da Rocha 2007-01-30 18:41:13 Re: Log, Logs and more Logs