pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Einspanjer <deinspanjer@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15085: Domain "not null" constraint doesn't detect a null returned from a resultset
Date: Tue, 27 Feb 2018 10:12:36 -0500
Message-ID: <4593.1519744356@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEfq8O1CbO8Ktg=G=3uLEPYzyJ-dCWsqC_VF4XOdTz4BiYt8oA@mail.gmail.com>
References: <151952089752.1463.4091997216675283064@wrigleys.postgresql.org>
	<CAKFQuwYhRsU_Qw4ird9YwgjQNxxX4+1Z0YDbRRGH_CENmOBDfg@mail.gmail.com>
	<13059.1519529706@sss.pgh.pa.us>
	<CAEfq8O1CbO8Ktg=G=3uLEPYzyJ-dCWsqC_VF4XOdTz4BiYt8oA@mail.gmail.com>

Daniel Einspanjer <deinspanjer@gmail.com> writes:
> Tom, please forgive me if this is a non-starter for a suggestion, but what
> about forcing a not null constraint on a column that is declared to be of
> the type of a domain that has a not null constraint?

I don't particularly want to go there.  What happens when you add or drop
the not null constraint on an existing domain type?

In any case, this would amount to positive reinforcement for people who
use domain not null constraints, which IMO is bad practice to start with.
Not everything in the SQL standard is a good idea.

			regards, tom lane




view thread (5+ messages)

Message-ID: <4593.1519744356@sss.pgh.pa.us>
Permalink:  ../4593.1519744356@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4593.1519744356@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, deinspanjer@gmail.com
  Subject: Re: BUG #15085: Domain "not null" constraint doesn't detect a null returned from a resultset
  In-Reply-To: <4593.1519744356@sss.pgh.pa.us>
  References: <151952089752.1463.4091997216675283064@wrigleys.postgresql.org> <CAKFQuwYhRsU_Qw4ird9YwgjQNxxX4+1Z0YDbRRGH_CENmOBDfg@mail.gmail.com> <13059.1519529706@sss.pgh.pa.us> <CAEfq8O1CbO8Ktg=G=3uLEPYzyJ-dCWsqC_VF4XOdTz4BiYt8oA@mail.gmail.com> <4593.1519744356@sss.pgh.pa.us>

* 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