mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Support ALTER THING .. DEPENDS ON EXTENSION
This introduces a new dependency type which marks an object as depending on an extension, such that if the extension is dropped, the object automatically goes away; and also, if the database is dumped, the object is included in the dump output. Currently the grammar supports this for indexes, triggers, materialized views and functions only, although the utility code is generic so adding support for more object types is a matter of touching the parser rules only. Author: Abhijit Menon-Sen Reviewed-by: Alexander Korotkov, Álvaro Herrera Discussion: http://www.postgresql.org/message-id/20160115062649.GA5068@toroid.org
This commit is contained in:
@@ -2535,6 +2535,20 @@ typedef struct RenameStmt
|
||||
bool missing_ok; /* skip error if missing? */
|
||||
} RenameStmt;
|
||||
|
||||
/* ----------------------
|
||||
* ALTER object DEPENDS ON EXTENSION extname
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct AlterObjectDependsStmt
|
||||
{
|
||||
NodeTag type;
|
||||
ObjectType objectType; /* OBJECT_FUNCTION, OBJECT_TRIGGER, etc */
|
||||
RangeVar *relation; /* in case a table is involved */
|
||||
List *objname; /* name of the object */
|
||||
List *objargs; /* argument types, if applicable */
|
||||
Value *extname; /* extension name */
|
||||
} AlterObjectDependsStmt;
|
||||
|
||||
/* ----------------------
|
||||
* ALTER object SET SCHEMA Statement
|
||||
* ----------------------
|
||||
|
||||
Reference in New Issue
Block a user