Fix improper quoting of format_type_be() output.
Per our message style guidelines, error messages incorporating the results of format_type_be() and its siblings should not add quotes around those results, because those functions already add quotes at need. Fix a few places that hadn't gotten that memo.
This commit is contained in:
parent
68cff231e3
commit
d5cb3bab56
@ -433,7 +433,7 @@ AggregateCreate(const char *aggName,
|
||||
if (aggTransType == INTERNALOID && func_strict(combinefn))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
|
||||
errmsg("combine function with \"%s\" transition type must not be declared STRICT",
|
||||
errmsg("combine function with transition type %s must not be declared STRICT",
|
||||
format_type_be(aggTransType))));
|
||||
|
||||
}
|
||||
|
@ -843,8 +843,8 @@ get_domain_constraint_oid(Oid typid, const char *conname, bool missing_ok)
|
||||
if (OidIsValid(conOid))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_OBJECT),
|
||||
errmsg("domain \"%s\" has multiple constraints named \"%s\"",
|
||||
format_type_be(typid), conname)));
|
||||
errmsg("domain %s has multiple constraints named \"%s\"",
|
||||
format_type_be(typid), conname)));
|
||||
conOid = HeapTupleGetOid(tuple);
|
||||
}
|
||||
}
|
||||
@ -855,7 +855,7 @@ get_domain_constraint_oid(Oid typid, const char *conname, bool missing_ok)
|
||||
if (!OidIsValid(conOid) && !missing_ok)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("constraint \"%s\" for domain \"%s\" does not exist",
|
||||
errmsg("constraint \"%s\" for domain %s does not exist",
|
||||
conname, format_type_be(typid))));
|
||||
|
||||
heap_close(pg_constraint, AccessShareLock);
|
||||
|
@ -3162,7 +3162,7 @@ RenameType(RenameStmt *stmt)
|
||||
if (stmt->renameType == OBJECT_DOMAIN && typTup->typtype != TYPTYPE_DOMAIN)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("\"%s\" is not a domain",
|
||||
errmsg("%s is not a domain",
|
||||
format_type_be(typeOid))));
|
||||
|
||||
/*
|
||||
|
@ -684,7 +684,7 @@ COMMENT ON CONSTRAINT the_constraint ON DOMAIN constraint_comments_dom IS 'yes,
|
||||
COMMENT ON CONSTRAINT no_constraint ON constraint_comments_tbl IS 'yes, the comment';
|
||||
ERROR: constraint "no_constraint" for table "constraint_comments_tbl" does not exist
|
||||
COMMENT ON CONSTRAINT no_constraint ON DOMAIN constraint_comments_dom IS 'yes, another comment';
|
||||
ERROR: constraint "no_constraint" for domain "constraint_comments_dom" does not exist
|
||||
ERROR: constraint "no_constraint" for domain constraint_comments_dom does not exist
|
||||
-- no such table/domain
|
||||
COMMENT ON CONSTRAINT the_constraint ON no_comments_tbl IS 'bad comment';
|
||||
ERROR: relation "no_comments_tbl" does not exist
|
||||
|
Loading…
x
Reference in New Issue
Block a user