mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Do a pass of code review for the ALTER TABLE ADD INHERITS patch. Keep
the read lock we hold on the table's parent relation until commit. Update equalfuncs.c for the new field in AlterTableCmd. Various improvements to comments, variable names, and error reporting. There is room for further improvement here, but this is at least a step in the right direction.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.340 2006/07/02 02:23:20 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.341 2006/07/02 05:17:26 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1801,8 +1801,8 @@ _copyAlterTableCmd(AlterTableCmd *from)
|
||||
|
||||
COPY_SCALAR_FIELD(subtype);
|
||||
COPY_STRING_FIELD(name);
|
||||
COPY_NODE_FIELD(def);
|
||||
COPY_NODE_FIELD(parent);
|
||||
COPY_NODE_FIELD(def);
|
||||
COPY_NODE_FIELD(transform);
|
||||
COPY_SCALAR_FIELD(behavior);
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.274 2006/07/02 02:23:20 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.275 2006/07/02 05:17:26 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -765,6 +765,7 @@ _equalAlterTableCmd(AlterTableCmd *a, AlterTableCmd *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(subtype);
|
||||
COMPARE_STRING_FIELD(name);
|
||||
COMPARE_NODE_FIELD(parent);
|
||||
COMPARE_NODE_FIELD(def);
|
||||
COMPARE_NODE_FIELD(transform);
|
||||
COMPARE_SCALAR_FIELD(behavior);
|
||||
|
Reference in New Issue
Block a user