Content-Length: 295685 | pFad | http://github.com/postgrespro/postgres/commit/c2ff42c6c1631c6c67d09fc8574186a984566a0d

98 Error message improvement · postgrespro/postgres@c2ff42c · GitHub
Skip to content

Commit c2ff42c

Browse files
committed
Error message improvement
1 parent 3486bcf commit c2ff42c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ ExecuteTruncate(TruncateStmt *stmt)
13691369
ereport(ERROR,
13701370
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
13711371
errmsg("cannot truncate only a partitioned table"),
1372-
errhint("Do not specify the ONLY keyword, or use truncate only on the partitions directly.")));
1372+
errhint("Do not specify the ONLY keyword, or use TRUNCATE ONLY on the partitions directly.")));
13731373
}
13741374

13751375
/*

src/test/regress/expected/truncate.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,12 @@ CREATE TABLE truncparted (a int, b char) PARTITION BY LIST (a);
455455
-- error, can't truncate a partitioned table
456456
TRUNCATE ONLY truncparted;
457457
ERROR: cannot truncate only a partitioned table
458-
HINT: Do not specify the ONLY keyword, or use truncate only on the partitions directly.
458+
HINT: Do not specify the ONLY keyword, or use TRUNCATE ONLY on the partitions directly.
459459
CREATE TABLE truncparted1 PARTITION OF truncparted FOR VALUES IN (1);
460460
INSERT INTO truncparted VALUES (1, 'a');
461461
-- error, must truncate partitions
462462
TRUNCATE ONLY truncparted;
463463
ERROR: cannot truncate only a partitioned table
464-
HINT: Do not specify the ONLY keyword, or use truncate only on the partitions directly.
464+
HINT: Do not specify the ONLY keyword, or use TRUNCATE ONLY on the partitions directly.
465465
TRUNCATE truncparted;
466466
DROP TABLE truncparted;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/c2ff42c6c1631c6c67d09fc8574186a984566a0d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy