Error message improvement
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 20 Feb 2018 22:58:27 +0000 (17:58 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 20 Feb 2018 22:58:27 +0000 (17:58 -0500)
src/backend/commands/tablecmds.c
src/test/regress/expected/truncate.out

index db6c8ff00e96980c7d17a00e447d77f1250a0acd..74e020bffc0c97b4edbfbbee505b236bfe6b30cb 100644 (file)
@@ -1369,7 +1369,7 @@ ExecuteTruncate(TruncateStmt *stmt)
            ereport(ERROR,
                    (errcode(ERRCODE_WRONG_OBJECT_TYPE),
                     errmsg("cannot truncate only a partitioned table"),
-                    errhint("Do not specify the ONLY keyword, or use truncate only on the partitions directly.")));
+                    errhint("Do not specify the ONLY keyword, or use TRUNCATE ONLY on the partitions directly.")));
    }
 
    /*
index d967e8dd21b244e58e45d4ea5e2eba0434155369..735d0e862df03f1c2c2f8a25c2eb6bef570d4921 100644 (file)
@@ -455,12 +455,12 @@ CREATE TABLE truncparted (a int, b char) PARTITION BY LIST (a);
 -- error, can't truncate a partitioned table
 TRUNCATE ONLY truncparted;
 ERROR:  cannot truncate only a partitioned table
-HINT:  Do not specify the ONLY keyword, or use truncate only on the partitions directly.
+HINT:  Do not specify the ONLY keyword, or use TRUNCATE ONLY on the partitions directly.
 CREATE TABLE truncparted1 PARTITION OF truncparted FOR VALUES IN (1);
 INSERT INTO truncparted VALUES (1, 'a');
 -- error, must truncate partitions
 TRUNCATE ONLY truncparted;
 ERROR:  cannot truncate only a partitioned table
-HINT:  Do not specify the ONLY keyword, or use truncate only on the partitions directly.
+HINT:  Do not specify the ONLY keyword, or use TRUNCATE ONLY on the partitions directly.
 TRUNCATE truncparted;
 DROP TABLE truncparted;