Re: Is this logical?

From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: "Behrang Saeedzadeh" <behrangsa(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Is this logical?
Date: 2006-09-10 16:15:17
Message-ID: 5.2.1.1.1.20060911001247.02e46888@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 01:12 AM 9/10/2006 +0330, Behrang Saeedzadeh wrote:

>Hi,
>
>Shouldn't this create statement trigger an error?
>
> create table bar (col1 int not null default null);

No.

>Shouldn't I be forbidden to insert null values into a non null column?

Yes.

Use "not null default null" when you want to force apps/people etc to
explicitly specify values when inserting.

Link.

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-09-10 17:04:38 Re: pg_dump and cluster
Previous Message Dave Page 2006-09-10 16:02:12 Re: Reinstall problem of PostgreSQL in Windows XP