Re: null values in non-nullable column - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: null values in non-nullable column
Date
Msg-id A4835168-385E-4687-81CE-3AB29D260DFF@seespotcode.net
Whole thread Raw
In response to Re: null values in non-nullable column  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: null values in non-nullable column  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Dec 5, 2006, at 11:52 , Tom Lane wrote:

> "George Pavlov" <gpavlov@mynewplace.com> writes:
>> -- this creates a table with a not-nullable column (datatype  
>> -- inherited from the original table) which contains nulls;
>
> Hm.  Arguably we should discard domain-ness in any SELECT result,
> but I'm sure some people would complain about that ...

Tom,

Could you expand on that a bit? Here's what I've interpreted:

The column types of the select are assumed to be (int,  
boolean_not_null), and so the values aren't checked again before the  
insert during CREATE TABLE AS. "discarding domain-ness" would mean  
considering the results as their base type, and rechecking the domain  
would be checked when inserting into the table.

Just trying to fit my head around this.

Michael Glaesemann
grzm seespotcode net




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: null values in non-nullable column
Next
From: Tom Lane
Date:
Subject: Re: null values in non-nullable column