Minor comment improvements in tablecmds.c

Lists: pgsql-hackers
From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Minor comment improvements in tablecmds.c
Date: 2014-02-25 02:40:27
Message-ID: 530C029B.5060805@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

This is a small patch to improve comments in tablecmds.c. Please find
attached a patch.

Thanks,

Best regards,
Etsuro Fujita

Attachment Content-Type Size
tablecmd_comment.patch text/plain 1.4 KB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor comment improvements in tablecmds.c
Date: 2014-02-25 18:41:31
Message-ID: CA+TgmoYEXHNAsnvV5VZ9Q0c9EWbqLhPG6-=HQtDw_vhyDLFH7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Feb 24, 2014 at 9:40 PM, Etsuro Fujita
<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> This is a small patch to improve comments in tablecmds.c. Please find
> attached a patch.

Committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor comment improvements in tablecmds.c
Date: 2014-02-25 18:44:27
Message-ID: 20140225184427.GY4759@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Etsuro Fujita wrote:
> This is a small patch to improve comments in tablecmds.c. Please find
> attached a patch.

I find both patched and unpatched to be pretty illegible. How about
something like

> /*
> - * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE RENAME
> + * Execute ALTER <relation type> RENAME
> + * This routine supports tables, indexes, sequences, views,
> + * and foreign tables
> */

and the two other ones with something like this:

> /*
> - * Grab an exclusive lock on the target table, index, sequence or view,
> - * which we will NOT release until end of transaction.
> + * Grab an exclusive lock on the target relation,
> + * which we will NOT release until
> + * end of transaction.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor comment improvements in tablecmds.c
Date: 2014-02-25 18:51:12
Message-ID: CA+TgmoajXYSoF8nw2OCcb-t_kDgYRV3VROFwM_3L2Wjq0O4=Ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Feb 25, 2014 at 1:44 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Etsuro Fujita wrote:
>> This is a small patch to improve comments in tablecmds.c. Please find
>> attached a patch.
>
> I find both patched and unpatched to be pretty illegible. How about
> something like
>
>> /*
>> - * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE RENAME
>> + * Execute ALTER <relation type> RENAME
>> + * This routine supports tables, indexes, sequences, views,
>> + * and foreign tables
>> */

I don't find that to be an improvement.

> and the two other ones with something like this:
>
>> /*
>> - * Grab an exclusive lock on the target table, index, sequence or view,
>> - * which we will NOT release until end of transaction.
>> + * Grab an exclusive lock on the target relation,
>> + * which we will NOT release until
>> + * end of transaction.

But I do like that better.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company