Revise command completion tags as per hackers message on 20 March.
authorPeter Eisentraut
Sat, 18 May 2002 15:44:48 +0000 (15:44 +0000)
committerPeter Eisentraut
Sat, 18 May 2002 15:44:48 +0000 (15:44 +0000)
33 files changed:
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/alter_trigger.sgml
doc/src/sgml/ref/close.sgml
doc/src/sgml/ref/create_aggregate.sgml
doc/src/sgml/ref/create_constraint.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_language.sgml
doc/src/sgml/ref/create_operator.sgml
doc/src/sgml/ref/create_rule.sgml
doc/src/sgml/ref/create_schema.sgml
doc/src/sgml/ref/create_sequence.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/create_type.sgml
doc/src/sgml/ref/create_view.sgml
doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/drop_aggregate.sgml
doc/src/sgml/ref/drop_domain.sgml
doc/src/sgml/ref/drop_function.sgml
doc/src/sgml/ref/drop_index.sgml
doc/src/sgml/ref/drop_language.sgml
doc/src/sgml/ref/drop_operator.sgml
doc/src/sgml/ref/drop_rule.sgml
doc/src/sgml/ref/drop_sequence.sgml
doc/src/sgml/ref/drop_table.sgml
doc/src/sgml/ref/drop_trigger.sgml
doc/src/sgml/ref/drop_type.sgml
doc/src/sgml/ref/drop_view.sgml
doc/src/sgml/ref/rollback.sgml
doc/src/sgml/ref/set.sgml
doc/src/sgml/ref/truncate.sgml
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c

index b0174bcd1e9ef8317010d1119a561d7290970c7a..4966eb757b8c527da568b9892ef5c781f987d124 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -141,7 +141,7 @@ ALTER TABLE table
 
     
      
-      ALTER
+      ALTER TABLE
       
        
    Message returned from column or table renaming.
index 8cf5168a5be59fa7804772fbbeb42529326f299a..cdfbb792c74408690500c6d170a494911af075c6 100644 (file)
@@ -78,7 +78,7 @@ ALTER TRIGGER trigger ON 
 
     
      
-      ALTER
+      ALTER TRIGGER
       
        
    Message returned from trigger renaming.
index 6e1204a7ad290845bce997ae62df0d823b8832ce..e82bb4d90ed2ede9f03eb85bff09ab5f9832243a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -58,7 +58,7 @@ CLOSE cursor
     
      
       
-CLOSE
+CLOSE CURSOR
        
       
        
index 0c326b6f8db821f5bf5d2cbc724c3007e7d70d21..21c547f6b67584286b8192c08b9d82aca09c4d82 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -134,7 +134,7 @@ CREATE AGGREGATE name ( BASETYPE =
     
      
       
-CREATE
+CREATE AGGREGATE
        
       
        
index c5af73ad42a162b68d53e180c37b5dc55ad7c7aa..0e86c93f01e646934845107799e8f0efc0afb96e 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -101,7 +101,7 @@ CREATE CONSTRAINT TRIGGER name
     
      
       
-CREATE CONSTRAINT
+CREATE TRIGGER
        
       
        
index 637d4965a4043e2bbff8b5fed377fdfb09d57780..a3af001006a58fca443f229733faa96bad13262b 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -174,7 +174,7 @@ CREATE [ UNIQUE ] INDEX index_name
     
      
       
-CREATE
+CREATE INDEX
        
       
        
index 4fc6399f3de2e37133d8a97dd8cf560dd113d0fe..e5f47be9ffeb74fb7e0afcd9b82058408cc91873 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -125,7 +125,7 @@ CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE langna
      
       
 
-CREATE
+CREATE LANGUAGE
 
       
      
index b1371140f1e1e42e03bf69c8ed55939ae2b4f204..82ea44921d986cd33ac92b5d8ff4a2410e6c37b3 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -176,7 +176,7 @@ CREATE OPERATOR name ( PROCEDURE = 
     
      
       
-CREATE
+CREATE OPERATOR
        
       
        
index ae9571a7c58659166c2852c92adf580c3f9754ae..86046359b4a04b526ff5bd8678af6eb14cb7d7b3 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -121,7 +121,7 @@ NOTHING
     
      
       
-CREATE
+CREATE RULE
        
       
        
index 64f96b34d9a8808253c92544eaad4a0faa6a4acf..daecc3b0d40c00c7cd36ba1c6736a014a4f70985 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -75,7 +75,7 @@ CREATE SCHEMA AUTHORIZATION username
     
      
       
-CREATE
+CREATE SCHEMA
        
       
        
index 5df6618bfa88ebbc48583fcb126df6742953772a..3db79850c8a04b9ca8299c0af125a2fe77207be3 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -161,7 +161,7 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname
     
      
       
-CREATE
+CREATE SEQUENCE
        
       
        
index 936fe1ba3cc23a7464cfdbd8f5a2d590907d694f..5ef7a5d6e70518da72c93682636e0550efda21ff 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -503,7 +503,7 @@ and table_constraint is:
     
      
       
-       CREATE
+       CREATE TABLE
       
      
     
index 243fe85271f6b179c85d75276150becbfba6641e..e9f66d95b48f6c9160def8bf575d16c0c681f7e3 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -98,7 +98,7 @@ CREATE TRIGGER name { BEFORE | AFTE
     
      
       
-CREATE
+CREATE TRIGGER
        
       
        
index 82847df7d76780b75e2fc2a6e977bb131b465360..042a8fd51d65cce06687abbf94d32eb6bd0c9634 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -186,7 +186,7 @@ CREATE TYPE typename ( INPUT = 
     
      
       
-CREATE
+CREATE TYPE
        
       
        
index f7fa744366adca5c63ae0aadfc008bcd65870cee..aa7c869285f2588693b5e640c99849984ee37032 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -81,7 +81,7 @@ class="PARAMETER">column name list ) ] AS SELECT 
     
      
       
-CREATE
+CREATE VIEW
        
       
        
index fee93fcbaba356a736686aa59458acc9493019c3..77c45d90b09e409d6e00bd6ee2b19cca332d5461 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -140,7 +140,7 @@ DECLARE cursorname [ BINARY ] [ INS
     
      
       
-SELECT
+DECLARE CURSOR
        
       
        
index b39daaaeb9e0ea5e33b985b07961fb12d04f518a..857a7f10f48c7fb16b82a984de1e34f274813ab5 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -69,7 +69,7 @@ DROP AGGREGATE name ( 
     
      
       
-DROP
+DROP AGGREGATE
        
       
        
index 0a74649f95daab6b34ca3b81b10d01a5d3fbc6b2..5bc73a065fab389c2436f6c0d5d13556cb3ed728 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -77,7 +77,7 @@ DROP DOMAIN domainname [, ...]  [ C
     
      
       
-DROP
+DROP DOMAIN
        
       
        
index 14c6f451c9804b7f5411a1166c946df1c4596d5a..268d8c66e8c60d67d529be55d365ceca9dfebfa7 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -65,7 +65,7 @@ DROP FUNCTION name ( [ 
     
      
       
-DROP
+DROP FUNCTION
        
       
        
index 99336704cf18de7bdc584503ff66fe4f478d07cb..0db2c6094613c6676df662757f72a7ab9f6a633d 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -56,7 +56,7 @@ DROP INDEX index_name [, ...]
     
      
       
-DROP
+DROP INDEX
        
       
        
index 26668d5995cf2192b4a9051ca0da0599a0f40a7f..08badab80832ae78602e61e6c9d90cf8b091e42e 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -58,7 +58,7 @@ DROP [ PROCEDURAL ] LANGUAGE name
     
      
       
-DROP
+DROP LANGUAGE
        
       
        
index 5383d3bea3432fe6d5bc9d80c93a616eb6d6dd71..bc4657038fdbb42058e4ef0812a6217a3349e14a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -76,7 +76,7 @@ DROP OPERATOR id ( 
     
      
       
-DROP
+DROP OPERATOR
        
       
        
index 1596b460c4052b2efee7ef0989ca1125b7ba29c1..4f8ea97f88d324287cc3eaa668af759e5275638a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -65,7 +65,7 @@ DROP RULE name ON 
     
      
       
-DROP
+DROP RULE
        
       
        
index 669d4962a57cbaae5de8bd4e5be751eab8f1636e..4c371164e1e9f784f441197bf2157835d9f8373a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -57,7 +57,7 @@ DROP SEQUENCE name [, ...]
     
      
       
-DROP
+DROP SEQUENCE
        
       
        
index 20de8b484ca8b3e4fda36b93ee07435407b03d8e..cae3275067d4785da8dd9eff5aa5eaf4e0f5eae2 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -56,7 +56,7 @@ DROP TABLE name [, ...]
     
      
       
-DROP
+DROP TABLE
        
       
        
index 30c92605497fb888bd42d30cf113fe02704d7c29..e4f157b1d7c0d8c23ed9c32145a80c38b25f5e91 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -66,7 +66,7 @@ DROP TRIGGER name ON 
     
      
       
-DROP
+DROP TRIGGER
        
       
        
index 9d88fc85b96cea019877e3803d5e121a93ede849..3ac0f17ae9fee5f6f630add5ca91161afb9a9140 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -56,7 +56,7 @@ DROP TYPE typename [, ...]
     
      
       
-DROP
+DROP TYPE
        
       
        
index 5d168628fdbefc9136d4663a3b680b404616fc01..a789e38c4ce1c2ce07ba3c5a6c61a3eb8da96cbf 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -58,7 +58,7 @@ DROP VIEW name [, ...]
     
      
       
-DROP
+DROP VIEW
        
       
        
index 9575386d3be2f00b920b3f92c694579ba26cc362..2f14ead684380cec5506e4709a0c82e623292d00 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -48,7 +48,7 @@ ROLLBACK [ WORK | TRANSACTION ]
     
      
       
-ABORT
+ROLLBACK
        
       
        
index f54f70c1979e0a1ef4336d9296bc80eebde0af0b..65ff6eca29fa8ef952ebdf5220a7f3ba52160a14 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -401,7 +401,7 @@ SELECT setseed(value);
     
    
     
-     SET VARIABLE
+     SET
      
       
        Message returned if successful.
index a3888b7d320206d1aec7f5f529a42bd6b3851f4a..723079ab3bcd5a67b88cdfdc7d403671acd75725 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -58,7 +58,7 @@ TRUNCATE [ TABLE ] name
     
      
       
-TRUNCATE
+TRUNCATE TABLE
        
       
        
index 1ea4fa9a6b546b4ee592c3f17f54b746f720236f..f5d00a300e3b60cd437dea2322339a24fb82d43f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.266 2002/05/17 18:32:52 petere Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.267 2002/05/18 15:44:47 petere Exp $
  *
  * NOTES
  *   this is the "main" module of the postgres backend and
@@ -1688,7 +1688,7 @@ PostgresMain(int argc, char *argv[], const char *username)
    if (!IsUnderPostmaster)
    {
        puts("\nPOSTGRES backend interactive interface ");
-       puts("$Revision: 1.266 $ $Date: 2002/05/17 18:32:52 $\n");
+       puts("$Revision: 1.267 $ $Date: 2002/05/18 15:44:47 $\n");
    }
 
    /*
@@ -2168,7 +2168,7 @@ CreateCommandTag(Node *parsetree)
            break;
 
        case T_ClosePortalStmt:
-           tag = "CLOSE";
+           tag = "CLOSE CURSOR";
            break;
 
        case T_FetchStmt:
@@ -2183,19 +2183,41 @@ CreateCommandTag(Node *parsetree)
            break;
 
        case T_CreateSchemaStmt:
-           tag = "CREATE";
+           tag = "CREATE SCHEMA";
            break;
 
        case T_CreateStmt:
-           tag = "CREATE";
+           tag = "CREATE TABLE";
            break;
 
        case T_DropStmt:
-           tag = "DROP";
+           switch (((DropStmt *) parsetree)->removeType)
+           {
+               case DROP_TABLE:
+                   tag = "DROP TABLE";
+                   break;
+               case DROP_SEQUENCE:
+                   tag = "DROP SEQUENCE";
+                   break;
+               case DROP_VIEW:
+                   tag = "DROP VIEW";
+                   break;
+               case DROP_INDEX:
+                   tag = "DROP INDEX";
+                   break;
+               case DROP_TYPE:
+                   tag = "DROP TYPE";
+                   break;
+               case DROP_DOMAIN:
+                   tag = "DROP DOMAIN";
+                   break;
+               default:
+                   tag = "???";
+           }
            break;
 
        case T_TruncateStmt:
-           tag = "TRUNCATE";
+           tag = "TRUNCATE TABLE";
            break;
 
        case T_CommentStmt:
@@ -2207,11 +2229,14 @@ CreateCommandTag(Node *parsetree)
            break;
 
        case T_RenameStmt:
-           tag = "ALTER";
+           if (((RenameStmt *)parsetree)->renameType == RENAME_TRIGGER)
+               tag = "ALTER TRIGGER";
+           else
+               tag = "ALTER TABLE";
            break;
 
        case T_AlterTableStmt:
-           tag = "ALTER";
+           tag = "ALTER TABLE";
            break;
 
        case T_GrantStmt:
@@ -2222,39 +2247,52 @@ CreateCommandTag(Node *parsetree)
            break;
 
        case T_DefineStmt:
-           tag = "CREATE";
+           switch (((DefineStmt *) parsetree)->defType)
+           {
+               case AGGREGATE:
+                   tag = "CREATE AGGREGATE";
+                   break;
+               case OPERATOR:
+                   tag = "CREATE OPERATOR";
+                   break;
+               case TYPE_P:
+                   tag = "CREATE TYPE";
+                   break;
+               default:
+                   tag = "???";
+           }
            break;
 
-       case T_ViewStmt:        /* CREATE VIEW */
-           tag = "CREATE";
+       case T_ViewStmt:
+           tag = "CREATE VIEW";
            break;
 
-       case T_CreateFunctionStmt:  /* CREATE FUNCTION */
-           tag = "CREATE";
+       case T_CreateFunctionStmt:
+           tag = "CREATE FUNCTION";
            break;
 
-       case T_IndexStmt:       /* CREATE INDEX */
-           tag = "CREATE";
+       case T_IndexStmt:
+           tag = "CREATE INDEX";
            break;
 
-       case T_RuleStmt:        /* CREATE RULE */
-           tag = "CREATE";
+       case T_RuleStmt:
+           tag = "CREATE RULE";
            break;
 
        case T_CreateSeqStmt:
-           tag = "CREATE";
+           tag = "CREATE SEQUENCE";
            break;
 
        case T_RemoveAggrStmt:
-           tag = "DROP";
+           tag = "DROP AGGREGATE";
            break;
 
        case T_RemoveFuncStmt:
-           tag = "DROP";
+           tag = "DROP FUNCTION";
            break;
 
        case T_RemoveOperStmt:
-           tag = "DROP";
+           tag = "DROP OPERATOR";
            break;
 
        case T_CreatedbStmt:
@@ -2307,31 +2345,41 @@ CreateCommandTag(Node *parsetree)
 #endif
 
        case T_VariableSetStmt:
-           tag = "SET VARIABLE";
+           tag = "SET";
            break;
 
        case T_VariableShowStmt:
-           tag = "SHOW VARIABLE";
+           tag = "SHOW";
            break;
 
        case T_VariableResetStmt:
-           tag = "RESET VARIABLE";
+           tag = "RESET";
            break;
 
        case T_CreateTrigStmt:
-           tag = "CREATE";
+           tag = "CREATE TRIGGER";
            break;
 
        case T_DropPropertyStmt:
-           tag = "DROP";
+           switch (((DropPropertyStmt *) parsetree)->removeType)
+           {
+               case DROP_TRIGGER:
+                   tag = "DROP TRIGGER";
+                   break;
+               case DROP_RULE:
+                   tag = "DROP RULE";
+                   break;
+               default:
+                   tag = "???";
+           }
            break;
 
        case T_CreatePLangStmt:
-           tag = "CREATE";
+           tag = "CREATE LANGUAGE";
            break;
 
        case T_DropPLangStmt:
-           tag = "DROP";
+           tag = "DROP LANGUAGE";
            break;
 
        case T_CreateUserStmt:
index e8df96a53defeb4bc6e26b6a6674f36f0745a2a3..7a7f36e84c3c3d66ce577de74317b28aaf52f995 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.52 2002/04/15 05:22:04 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.53 2002/05/18 15:44:48 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -227,7 +227,7 @@ ProcessQuery(Query *parsetree,
 
        /* Set completion tag.  SQL calls this operation DECLARE CURSOR */
        if (completionTag)
-           strcpy(completionTag, "DECLARE");
+           strcpy(completionTag, "DECLARE CURSOR");
 
        return;
    }