Fix a case of string building.

This commit is contained in:
Alvaro Herrera 2008-11-10 21:49:16 +00:00
parent 5e11e73d37
commit a44564b4f8
2 changed files with 10 additions and 6 deletions

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.81 2008/10/04 21:56:52 tgl Exp $
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.82 2008/11/10 21:49:16 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@ -2094,9 +2094,13 @@ getObjectDescription(const ObjectAddress *object)
if (OidIsValid(con->conrelid))
{
appendStringInfo(&buffer, _("constraint %s on "),
NameStr(con->conname));
getRelationDescription(&buffer, con->conrelid);
StringInfoData rel;
initStringInfo(&rel);
getRelationDescription(&rel, con->conrelid);
appendStringInfo(&buffer, _("constraint %s on %s"),
NameStr(con->conname), rel.data);
pfree(rel.data);
}
else
{

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_op.c,v 1.16 2008/05/16 16:31:01 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_op.c,v 1.17 2008/11/10 21:49:16 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@ -1348,7 +1348,7 @@ tsvector_update_trigger(PG_FUNCTION_ARGS, bool config_column)
if (!is_text_type(SPI_gettypeid(rel->rd_att, numattr)))
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("column \"%s\" is not of character type",
errmsg("column \"%s\" is not of a character type",
trigger->tgargs[i])));
datum = SPI_getbinval(rettuple, rel->rd_att, numattr, &isnull);