diff options
| author | Tom Lane | 2002-07-18 16:47:26 +0000 |
|---|---|---|
| committer | Tom Lane | 2002-07-18 16:47:26 +0000 |
| commit | 11333426f103bedef311d1dd88b62176276b8544 (patch) | |
| tree | b5f5e131cec41db79d3586aa2d4528d7f3067b8a /src/backend/tcop | |
| parent | 8bed350c4ae6a5b4e7c1bd73b67ca4014960876b (diff) | |
Implement DROP SCHEMA. It lacks support for dropping conversions and
operator classes, both of which are schema-local and so should really
be droppable.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/postgres.c | 9 | ||||
| -rw-r--r-- | src/backend/tcop/utility.c | 21 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 154e478687b..862faf34cae 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.270 2002/07/13 01:02:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.271 2002/07/18 16:47:25 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1693,7 +1693,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.270 $ $Date: 2002/07/13 01:02:14 $\n"); + puts("$Revision: 1.271 $ $Date: 2002/07/18 16:47:25 $\n"); } /* @@ -2220,7 +2220,10 @@ CreateCommandTag(Node *parsetree) tag = "DROP DOMAIN"; break; case DROP_CONVERSION: - tag = "DROP CONVERSON"; + tag = "DROP CONVERSION"; + break; + case DROP_SCHEMA: + tag = "DROP SCHEMA"; break; default: tag = "???"; diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 86373943667..8ba7466ee28 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.162 2002/07/12 18:43:17 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.163 2002/07/18 16:47:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -252,11 +252,7 @@ ProcessUtility(Node *parsetree, * relation and attribute manipulation */ case T_CreateSchemaStmt: - { - CreateSchemaStmt *stmt = (CreateSchemaStmt *) parsetree; - - CreateSchemaCommand(stmt); - } + CreateSchemaCommand((CreateSchemaStmt *) parsetree); break; case T_CreateStmt: @@ -322,17 +318,20 @@ ProcessUtility(Node *parsetree, break; case DROP_CONVERSION: - /* RemoveDomain does its own permissions checks */ + /* does its own permissions checks */ DropConversionCommand(names); break; + + case DROP_SCHEMA: + /* RemoveSchema does its own permissions checks */ + RemoveSchema(names, stmt->behavior); + break; } /* - * Make sure subsequent loop iterations will see - * results of this one; needed if removing multiple - * rules for same table, for example. + * We used to need to do CommandCounterIncrement() + * here, but now it's done inside performDeletion(). */ - CommandCounterIncrement(); } } break; |
