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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy