Minor comment improvements in tablecmds.c
This is a small patch to improve comments in tablecmds.c. Please find
attached a patch.
Thanks,
Best regards,
Etsuro Fujita
Attachments:
tablecmd_comment.patchtext/plain; charset=Shift_JIS; name=tablecmd_comment.patchDownload
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 08b037e..ed9d206 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -2468,7 +2468,8 @@ RenameConstraint(RenameStmt *stmt)
}
/*
- * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE RENAME
+ * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/MATERIALIZED VIEW/FOREIGN TABLE
+ * RENAME
*/
Oid
RenameRelation(RenameStmt *stmt)
@@ -2476,8 +2477,9 @@ RenameRelation(RenameStmt *stmt)
Oid relid;
/*
- * 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 table, index, sequence, view,
+ * materialized view, or foreign table, which we will NOT release until
+ * end of transaction.
*
* Lock level used here should match RenameRelationInternal, to avoid lock
* escalation.
@@ -2520,8 +2522,9 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal)
Oid namespaceId;
/*
- * 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 table, index, sequence, view,
+ * materialized view, or foreign table, which we will NOT release until
+ * end of transaction.
*/
targetrelation = relation_open(myrelid, AccessExclusiveLock);
namespaceId = RelationGetNamespace(targetrelation);
On Mon, Feb 24, 2014 at 9:40 PM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Tue, Feb 25, 2014 at 1:44 PM, Alvaro Herrera
<alvherre@2ndquadrant.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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers