Re: null values in non-nullable column

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "George Pavlov" <gpavlov(at)mynewplace(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: null values in non-nullable column
Date: 2006-12-05 03:30:44
Message-ID: A4835168-385E-4687-81CE-3AB29D260DFF@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Dec 5, 2006, at 11:52 , Tom Lane wrote:

> "George Pavlov" <gpavlov(at)mynewplace(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-12-05 03:49:07 Re: null values in non-nullable column
Previous Message Tom Lane 2006-12-05 02:52:46 Re: null values in non-nullable column