pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: exclusion@gmail.com, dean.a.rasheed@gmail.com, andrewbille@gmail.com, peter@eisentraut.org, pgsql-hackers@lists.postgresql.org, Justin Pryzby <pryzby@telsasoft.com>
Subject: Re: cataloguing NOT NULL constraints
Date: Tue, 14 May 2024 11:58:11 +0200
Message-ID: <202405140958.wadpw2ittguw@alvherre.pgsql> (raw)
In-Reply-To: <CA+TgmoYR356AHUoVT-57Lf-_MheDBqLukJyhipAcxVZHtVtrwA@mail.gmail.com>

On 2024-May-13, Robert Haas wrote:

> It seems to me that the practical thing to do about this problem is
> just decide not to solve it. I mean, it's currently the case that if
> you establish a PRIMARY KEY when you create a table, the columns of
> that key are marked NOT NULL and remain NOT NULL even if the primary
> key is later dropped. So, if that didn't change, we would be no less
> compliant with the SQL standard (or your reading of it) than we are
> now.
[...]
> So I don't really think it's a great idea to change this behavior, but
> even if it is, is it such a good idea that we want to sink the whole
> patch set repeatedly over it, as has already happened twice now? I
> feel that if we did what Tom suggested a year ago in
> https://www.postgresql.org/message-id/3801207.1681057430@sss.pgh.pa.us
> -- "I'm inclined to think that this idea of suppressing the implied
> NOT NULL from PRIMARY KEY is a nonstarter and we should just go ahead
> and make such a constraint" [...]

Hmm, I hadn't interpreted Tom's message the way you suggest, and you may
be right that it might be a good way forward.  I'll keep this in mind
for next time.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"No es bueno caminar con un hombre muerto"





view thread (196+ messages)  latest in thread

Message-ID: <202405140958.wadpw2ittguw@alvherre.pgsql>
Permalink:  ../202405140958.wadpw2ittguw@alvherre.pgsql/
Also on:    postgresql.org/message-id/202405140958.wadpw2ittguw@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, robertmhaas@gmail.com, horikyota.ntt@gmail.com, pryzby@telsasoft.com
  Subject: Re: cataloguing NOT NULL constraints
  In-Reply-To: <202405140958.wadpw2ittguw@alvherre.pgsql>

* 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