Re: Should we consider empty fields as NULL values when - Mailing list pgsql-general

From Doug McNaught
Subject Re: Should we consider empty fields as NULL values when
Date
Msg-id 87he07qudy.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Should we consider empty fields as NULL values when dealing with string columns ?  ("Nagib Abi Fadel" <nagib.abi-fadel@usj.edu.lb>)
List pgsql-general
"Nagib Abi Fadel" <nagib.abi-fadel@usj.edu.lb> writes:

>    The issue is that since the column col1 is defined as character with
>    not null attribute,
>
>    shouldn't we deny such inserts (i mean inserting empty fields)???

NULL and the empty string '' are *completely* different things.  If
you want to disallow empty strings as well as NULL, use a CHECK
constraint on that column.

-Doug

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Storing Snapshot Data
Next
From: Greenwich Support
Date:
Subject: Weird Problem With PostgreSQL 7.3.1 and VB.Net Datagrid