Re: Clarify deleting comments and security labels in synopsis

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Clarify deleting comments and security labels in synopsis
Date: 2023-01-31 18:07:15
Message-ID: 87pmauk27g.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari(at)ilmari(dot)org> 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.

Makes sense. Something like the attached v2?

> regards, tom lane

- ilmari

Attachment Content-Type Size
v2-0001-Clarify-that-COMMENT-and-SECURITY-LABEL-can-be-se.patch text/x-diff 3.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-01-31 18:49:38 Re: Make EXPLAIN generate a generic plan for a parameterized query
Previous Message vignesh C 2023-01-31 17:51:19 Re: Fix database creation during installchecks for ICU cluster