Re: Should we consider empty fields as NULL values when

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "Nagib Abi Fadel" <nagib(dot)abi-fadel(at)usj(dot)edu(dot)lb>
Cc: "generalpost" <pgsql-general(at)postgresql(dot)org>, "developPost" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should we consider empty fields as NULL values when
Date: 2003-12-11 14:52:25
Message-ID: 87he07qudy.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Nagib Abi Fadel" <nagib(dot)abi-fadel(at)usj(dot)edu(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2003-12-11 14:52:43 Re: [HACKERS] Should we consider empty fields as NULL values when dealing with string columns ?
Previous Message Nagib Abi Fadel 2003-12-11 14:36:56 Should we consider empty fields as NULL values when dealing with string columns ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2003-12-11 14:52:43 Re: [HACKERS] Should we consider empty fields as NULL values when dealing with string columns ?
Previous Message Nagib Abi Fadel 2003-12-11 14:36:56 Should we consider empty fields as NULL values when dealing with string columns ?