Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXUzn-00089G-IA for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Mar 2023 22:32:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pXUzl-0004u3-K9 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Mar 2023 22:32:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXUzl-0004tu-6Z for pgsql-hackers@lists.postgresql.org; Wed, 01 Mar 2023 22:32:21 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pXUzi-0006aG-G5 for pgsql-hackers@lists.postgresql.org; Wed, 01 Mar 2023 22:32:20 +0000 Received: by mail-qt1-x82d.google.com with SMTP id y10so11496842qtj.2 for ; Wed, 01 Mar 2023 14:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; t=1677709936; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=IkeS6zDyHhg40B06hNWBuxLPjXR2qU1WIymqBi3SmXQ=; b=h/MmtPyqA3kFfNQLQ/NYXg2ATuQaOoqeHine8uRGDiKc2WPPjqxdaNAvajnLRkgt+w GKgYmPnxG3ryhbwjBNTw3GbiGVNkYMLa5Ic7cr06QlR8fw0XS4ufEbg6nDzCJPcptG2O EaH8r/S4L1cWghwhtbrHGatvehYxgO1qt0o2RuOSavWZK8aPLEK5nbEPvjPHV2GOoC0K 3DGrFL8uWU/LAOsW11nAKPYRYv9WqBmmVZok1/JzMNJqOgf+K56IaPDn+MlQFuTmaSCi zJkjiC8fSSvZ3tOkZMatqE4QYVbgH9DagMJzVlCPEHBsn5DvdN0BTmF2qO63Knc6c0O6 q5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677709936; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IkeS6zDyHhg40B06hNWBuxLPjXR2qU1WIymqBi3SmXQ=; b=cqEsdPKJyhYm3R+wMyvCUoT5FzqxzpkQBqDSLWwoMa/dremFHkaRy8Ts+TMuuhmvQU RAUEwS2fARX6pVhKJ8bs9Tv9zHCefTEyyzlNDtDxuAJaimxD0rKFmcietWya/H2poM3O dzk1tOguEDALlrtH0jGMcH4z10l3Q3VMHhMUnLHZOr2CQo5tm+xwN3iZZA8HqAkb/msO vAPBIGz0mDEequRxi3Q/TiZbr6KlH23hukueE0T7Pqmjw0jGvBhzUQ9G6absEHcDhK1S R4YNQmRMHPM1+T+kRGAeCgb3SviOSkHBTEikuyU9egc18Zo6h+CoforXWKsYFhr8h2Bf YSHw== X-Gm-Message-State: AO0yUKX6wRiXnZMY5EzSxza2bEm/9rgbJuSFAoA7Kk0RiVRChaLUkYfe S37JjCHxpOn8i6OArsuQvRoPLw== X-Google-Smtp-Source: AK7set+5HWPYMIZ8bxODTHbvdrp2C5ZSOswnb+FVOKOtSZWg3dTSI2QqxdHtHpICMLAoHavv+QlyNw== X-Received: by 2002:a05:622a:1046:b0:3b8:5a96:166 with SMTP id f6-20020a05622a104600b003b85a960166mr11496396qte.35.1677709936513; Wed, 01 Mar 2023 14:32:16 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id h21-20020ac87155000000b003b85ed59fa2sm9025754qtp.50.2023.03.01.14.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 14:32:15 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id BC639800406; Wed, 1 Mar 2023 16:32:14 -0600 (CST) Date: Wed, 1 Mar 2023 16:32:14 -0600 From: Justin Pryzby To: Alvaro Herrera Cc: pgsql-hackers@lists.postgresql.org Subject: Re: cataloguing NOT NULL constraints Message-ID: <20230301223214.GC4268@telsasoft.com> References: <20220817181249.q7qvj3okywctra3c@alvherre.pgsql> <20230228191537.x4sepwytcclxpl3j@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230228191537.x4sepwytcclxpl3j@alvherre.pgsql> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 28, 2023 at 08:15:37PM +0100, Alvaro Herrera wrote: > Since nobody liked the idea of listing the constraints in psql \d's > footer, I changed \d+ so that the "not null" column shows the name of > the constraint if there is one, or the string "(primary key)" if the > attnotnull marking for the column comes from the primary key. The new > column is going to be quite wide in some cases; if we want to hide it > further, we could add the mythical \d++ and have *that* list the > constraint name, keeping \d+ as current. One concern here is that the title "NOT NULL Constraint" is itself pretty wide, which is an issue for tables which have no not-null constraints. On Wed, Mar 01, 2023 at 01:03:48PM +0100, Alvaro Herrera wrote: > Hmm, so it turned out that cfbot didn't like this because I didn't patch > one of the compression.out alternate files. Fixed here. I think in the > future I'm not going to submit the 0003 patch, because it's not very > interesting while being way too bulky and also the one most likely to > have conflicts. I like \dt++, and it seems like the obvious thing to do here, to avoid changing lots of regression test output, which seems worth avoiding in any case, due to ensuing conflicts in other patches being developed, and in backpatching. Right now, \dt+ includes a bit too much output, including things like sizes, which makes it hard to test. Moving some things into \dt++ would make \dt+ more testable (and more usable BTW). Even if that's not true of (or not a good idea) for \dt+, I'm sure it applies to other slash commands. Currently, fourty-five (45) psql commands support verbose "plus" variants, and the sql regression tests exercise fifteen (15) of them. I proposed \dn++, \dA++, and \db++ in 2ndary patches here: https://commitfest.postgresql.org/42/3256/ I've considered sending a patch with "plusplus" commands as 001, to propose that on its own merits rather than in the context of \d[Abn]++ -- Justin