mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +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:
@@ -1171,6 +1171,7 @@ typedef struct AlterTableStmt
|
||||
RangeVar *relation; /* table to work on */
|
||||
List *cmds; /* list of subcommands */
|
||||
ObjectType relkind; /* type of object */
|
||||
bool missing_ok; /* skip error if table missing */
|
||||
} AlterTableStmt;
|
||||
|
||||
typedef enum AlterTableType
|
||||
@@ -1807,6 +1808,7 @@ typedef struct AlterSeqStmt
|
||||
NodeTag type;
|
||||
RangeVar *sequence; /* the sequence to alter */
|
||||
List *options;
|
||||
bool missing_ok; /* skip error if a role is missing? */
|
||||
} AlterSeqStmt;
|
||||
|
||||
/* ----------------------
|
||||
@@ -2117,6 +2119,7 @@ typedef struct RenameStmt
|
||||
* trigger, etc) */
|
||||
char *newname; /* the new name */
|
||||
DropBehavior behavior; /* RESTRICT or CASCADE behavior */
|
||||
bool missing_ok; /* skip error if missing? */
|
||||
} RenameStmt;
|
||||
|
||||
/* ----------------------
|
||||
@@ -2132,6 +2135,7 @@ typedef struct AlterObjectSchemaStmt
|
||||
List *objarg; /* argument types, if applicable */
|
||||
char *addname; /* additional name if needed */
|
||||
char *newschema; /* the new schema */
|
||||
bool missing_ok; /* skip error if missing? */
|
||||
} AlterObjectSchemaStmt;
|
||||
|
||||
/* ----------------------
|
||||
|
||||
Reference in New Issue
Block a user