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 1pMuXd-0004MG-63 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Jan 2023 17:35:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pMuXb-0008Og-VL for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Jan 2023 17:35:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMuXb-0008OV-LT for pgsql-hackers@lists.postgresql.org; Tue, 31 Jan 2023 17:35:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMuXZ-0000R4-Bm for pgsql-hackers@postgresql.org; Tue, 31 Jan 2023 17:35:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30VHZQlX1139371; Tue, 31 Jan 2023 12:35:26 -0500 From: Tom Lane To: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= cc: pgsql-hackers@postgresql.org Subject: Re: Clarify deleting comments and security labels in synopsis In-reply-to: <87sffqk4zp.fsf@wibble.ilmari.org> References: <87sffqk4zp.fsf@wibble.ilmari.org> Comments: In-reply-to =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= message dated "Tue, 31 Jan 2023 17:07:06 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1139369.1675186526.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 31 Jan 2023 12:35:26 -0500 Message-ID: <1139370.1675186526@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > A user on IRC was confused about how to delete a security label using > the `SECURITY LABLEL ON … IS …` command, and looking at the docs I can > see why. > The synopsis just says `IS 'label'`, which implies that it can only be a > string. It's not until you read the description for `label` that you > see "or `NULL` to drop the security label." I propose making the > synopsis say `IS { 'label' | NULL }` to make it clear that it can be > NULL as well. The same applies to `COMMENT ON … IS …`, which I've also > changed similarly in the attached. Agreed; as-is, the syntax summary is not just confusing but outright wrong. I think we could go further and split the entry under Parameters to match: 'text' The new comment (must be a simple string literal, not an expression). NULL Write NULL to drop the comment. regards, tom lane