From: Michael Glaesemann <grzm@seespotcode.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: George Pavlov <gpavlov@mynewplace.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: null values in non-nullable column
Date: Tue, 5 Dec 2006 12:30:44 +0900
Message-ID: <A4835168-385E-4687-81CE-3AB29D260DFF@seespotcode.net> (raw)
In-Reply-To: <25943.1165287166@sss.pgh.pa.us>
References: <8C5B026B51B6854CBE88121DBF097A8661E3FC@ehost010-33.exch010.intermedia.net>
<25943.1165287166@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: grzm@seespotcode.net, tgl@sss.pgh.pa.us, gpavlov@mynewplace.com
Subject: Re: null values in non-nullable column
In-Reply-To: <A4835168-385E-4687-81CE-3AB29D260DFF@seespotcode.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox