Cosmetic change in catalog/index.c

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Cosmetic change in catalog/index.c
Date: 2003-02-13 15:09:35
Message-ID: 0845c4e450b46ea37530e68f04c7f58e@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

Very minor cosmetic patch to catalog/index.c: I noticed when replying to
bug #895 that the error message "relation already exists" is not
capitilized as the rest are:

ERROR: relation named "pk_exchange_batch_idx" already exists

This patch fixes that and a few other places where the capitilization
is needed.

--
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200302131005

Index: index.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/catalog/index.c,v
retrieving revision 1.208
diff -c -r1.208 index.c
*** index.c 2002/12/15 16:17:38 1.208
--- index.c 2003/02/13 15:04:27
***************
*** 235,241 ****
* here we are indexing on a normal attribute (1...n)
*/
if (atnum > natts)
! elog(ERROR, "cannot create index: column %d does not exist",
atnum);

from = heapTupDesc->attrs[AttrNumberGetAttrOffset(atnum)];
--- 235,241 ----
* here we are indexing on a normal attribute (1...n)
*/
if (atnum > natts)
! elog(ERROR, "Cannot create index: column %d does not exist",
atnum);

from = heapTupDesc->attrs[AttrNumberGetAttrOffset(atnum)];
***************
*** 540,546 ****
*/
if (indexInfo->ii_NumIndexAttrs < 1 ||
indexInfo->ii_NumKeyAttrs < 1)
! elog(ERROR, "must index at least one column");

if (!allow_system_table_mods &&
IsSystemRelation(heapRelation) &&
--- 540,546 ----
*/
if (indexInfo->ii_NumIndexAttrs < 1 ||
indexInfo->ii_NumKeyAttrs < 1)
! elog(ERROR, "Must index at least one column");

if (!allow_system_table_mods &&
IsSystemRelation(heapRelation) &&
***************
*** 558,564 ****
elog(ERROR, "Shared indexes cannot be created after initdb");

if (get_relname_relid(indexRelationName, namespaceId))
! elog(ERROR, "relation named \"%s\" already exists",
indexRelationName);

/*
--- 558,564 ----
elog(ERROR, "Shared indexes cannot be created after initdb");

if (get_relname_relid(indexRelationName, namespaceId))
! elog(ERROR, "Relation named \"%s\" already exists",
indexRelationName);

/*
***************
*** 671,677 ****
constraintType = CONSTRAINT_UNIQUE;
else
{
! elog(ERROR, "index_create: constraint must be PRIMARY or UNIQUE");
constraintType = 0; /* keep compiler quiet */
}

--- 671,677 ----
constraintType = CONSTRAINT_UNIQUE;
else
{
! elog(ERROR, "Index_create: constraint must be PRIMARY or UNIQUE");
constraintType = 0; /* keep compiler quiet */
}

***************
*** 1036,1042 ****

if (heaprel->rd_rel->relkind != RELKIND_RELATION &&
heaprel->rd_rel->relkind != RELKIND_TOASTVALUE)
! elog(ERROR, "relation %s isn't an indexable relation",
RelationGetRelationName(heaprel));

/* If pg_class.relhasindex is set, indexes are active */
--- 1036,1042 ----

if (heaprel->rd_rel->relkind != RELKIND_RELATION &&
heaprel->rd_rel->relkind != RELKIND_TOASTVALUE)
! elog(ERROR, "Relation %s isn't an indexable relation",
RelationGetRelationName(heaprel));

/* If pg_class.relhasindex is set, indexes are active */
***************
*** 1796,1808 ****
if (iRel->rd_rel->relisshared)
{
if (!IsIgnoringSystemIndexes())
! elog(ERROR, "the target relation %u is shared", indexId);
inplace = true;
}
if (iRel->rd_isnailed)
{
if (!IsIgnoringSystemIndexes())
! elog(ERROR, "the target relation %u is nailed", indexId);
inplace = true;
}

--- 1796,1808 ----
if (iRel->rd_rel->relisshared)
{
if (!IsIgnoringSystemIndexes())
! elog(ERROR, "The target relation %u is shared", indexId);
inplace = true;
}
if (iRel->rd_isnailed)
{
if (!IsIgnoringSystemIndexes())
! elog(ERROR, "The target relation %u is nailed", indexId);
inplace = true;
}

***************
*** 1919,1925 ****
deactivate_needed = true;
}
else
! elog(ERROR, "the target relation %u is shared", relid);
}

old = SetReindexProcessing(true);
--- 1919,1925 ----
deactivate_needed = true;
}
else
! elog(ERROR, "The target relation %u is shared", relid);
}

old = SetReindexProcessing(true);

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE+S7SDvJuQZxSWSsgRAmZFAKDcJbSmMbfWXMmekB/xopQ9Qtj8mACg19FB
+hZkHs8APOZsWA5geYlTDD8=
=ZIrU
-----END PGP SIGNATURE-----

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-02-13 18:30:50 Re: [HACKERS] parse_expr.c another type produced by transformations?
Previous Message Jeroen T. Vermeulen 2003-02-13 13:49:34 psql patch