mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08:00
Improve quoting in some error messages
This commit is contained in:
parent
ac725ee0f9
commit
07e5e66742
@ -290,7 +290,7 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
|
||||
if (heaprel == NULL || heapid != IndexGetRelation(indrelid, false))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_TABLE),
|
||||
errmsg("could not open parent table of index %s",
|
||||
errmsg("could not open parent table of index \"%s\"",
|
||||
RelationGetRelationName(indrel))));
|
||||
|
||||
/* Relation suitable for checking as B-Tree? */
|
||||
@ -535,7 +535,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
|
||||
if (metad->btm_fastroot != metad->btm_root)
|
||||
ereport(DEBUG1,
|
||||
(errcode(ERRCODE_NO_DATA),
|
||||
errmsg_internal("harmless fast root mismatch in index %s",
|
||||
errmsg_internal("harmless fast root mismatch in index \"%s\"",
|
||||
RelationGetRelationName(rel)),
|
||||
errdetail_internal("Fast root block %u (level %u) differs from true root block %u (level %u).",
|
||||
metad->btm_fastroot, metad->btm_fastlevel,
|
||||
@ -2277,7 +2277,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
|
||||
{
|
||||
ereport(DEBUG1,
|
||||
(errcode(ERRCODE_NO_DATA),
|
||||
errmsg_internal("harmless interrupted page split detected in index %s",
|
||||
errmsg_internal("harmless interrupted page split detected in index \"%s\"",
|
||||
RelationGetRelationName(state->rel)),
|
||||
errdetail_internal("Block=%u level=%u left sibling=%u page lsn=%X/%X.",
|
||||
blkno, opaque->btpo_level,
|
||||
|
@ -1060,7 +1060,7 @@ brin_summarize_range(PG_FUNCTION_ARGS)
|
||||
if (heapRel == NULL || heapoid != IndexGetRelation(indexoid, false))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_TABLE),
|
||||
errmsg("could not open parent table of index %s",
|
||||
errmsg("could not open parent table of index \"%s\"",
|
||||
RelationGetRelationName(indexRel))));
|
||||
|
||||
/* OK, do it */
|
||||
@ -1137,7 +1137,7 @@ brin_desummarize_range(PG_FUNCTION_ARGS)
|
||||
if (heapRel == NULL || heapoid != IndexGetRelation(indexoid, false))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_TABLE),
|
||||
errmsg("could not open parent table of index %s",
|
||||
errmsg("could not open parent table of index \"%s\"",
|
||||
RelationGetRelationName(indexRel))));
|
||||
|
||||
/* the revmap does the hard work */
|
||||
|
@ -93,14 +93,14 @@
|
||||
#define CHECK_REL_PROCEDURE(pname) \
|
||||
do { \
|
||||
if (indexRelation->rd_indam->pname == NULL) \
|
||||
elog(ERROR, "function %s is not defined for index %s", \
|
||||
elog(ERROR, "function \"%s\" is not defined for index \"%s\"", \
|
||||
CppAsString(pname), RelationGetRelationName(indexRelation)); \
|
||||
} while(0)
|
||||
|
||||
#define CHECK_SCAN_PROCEDURE(pname) \
|
||||
do { \
|
||||
if (scan->indexRelation->rd_indam->pname == NULL) \
|
||||
elog(ERROR, "function %s is not defined for index %s", \
|
||||
elog(ERROR, "function \"%s\" is not defined for index \"%s\"", \
|
||||
CppAsString(pname), RelationGetRelationName(scan->indexRelation)); \
|
||||
} while(0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user