1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-15 03:41:20 +03:00

ALTER <thing> [IF EXISTS] ... allows silent DDL if required,

e.g. ALTER FOREIGN TABLE IF EXISTS foo RENAME TO bar

Pavel Stehule
This commit is contained in:
Simon Riggs
2012-01-23 23:25:04 +00:00
parent 4993a49b7c
commit b8a91d9d1c
19 changed files with 534 additions and 52 deletions

View File

@@ -2540,6 +2540,7 @@ _copyAlterTableStmt(const AlterTableStmt *from)
COPY_NODE_FIELD(relation);
COPY_NODE_FIELD(cmds);
COPY_SCALAR_FIELD(relkind);
COPY_SCALAR_FIELD(missing_ok);
return newnode;
}
@@ -2904,6 +2905,7 @@ _copyRenameStmt(const RenameStmt *from)
COPY_STRING_FIELD(subname);
COPY_STRING_FIELD(newname);
COPY_SCALAR_FIELD(behavior);
COPY_SCALAR_FIELD(missing_ok);
return newnode;
}
@@ -2919,6 +2921,7 @@ _copyAlterObjectSchemaStmt(const AlterObjectSchemaStmt *from)
COPY_NODE_FIELD(objarg);
COPY_STRING_FIELD(addname);
COPY_STRING_FIELD(newschema);
COPY_SCALAR_FIELD(missing_ok);
return newnode;
}
@@ -3222,6 +3225,7 @@ _copyAlterSeqStmt(const AlterSeqStmt *from)
COPY_NODE_FIELD(sequence);
COPY_NODE_FIELD(options);
COPY_SCALAR_FIELD(missing_ok);
return newnode;
}

View File

@@ -1010,6 +1010,7 @@ _equalAlterTableStmt(const AlterTableStmt *a, const AlterTableStmt *b)
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(cmds);
COMPARE_SCALAR_FIELD(relkind);
COMPARE_SCALAR_FIELD(missing_ok);
return true;
}
@@ -1310,6 +1311,7 @@ _equalRenameStmt(const RenameStmt *a, const RenameStmt *b)
COMPARE_STRING_FIELD(subname);
COMPARE_STRING_FIELD(newname);
COMPARE_SCALAR_FIELD(behavior);
COMPARE_SCALAR_FIELD(missing_ok);
return true;
}
@@ -1323,6 +1325,7 @@ _equalAlterObjectSchemaStmt(const AlterObjectSchemaStmt *a, const AlterObjectSch
COMPARE_NODE_FIELD(objarg);
COMPARE_STRING_FIELD(addname);
COMPARE_STRING_FIELD(newschema);
COMPARE_SCALAR_FIELD(missing_ok);
return true;
}
@@ -1576,6 +1579,7 @@ _equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b)
{
COMPARE_NODE_FIELD(sequence);
COMPARE_NODE_FIELD(options);
COMPARE_SCALAR_FIELD(missing_ok);
return true;
}