mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Change some ABORTS to ERROR. Add line number when COPY Failure.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.23 1998/01/05 03:30:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.24 1998/01/05 16:38:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -56,7 +56,7 @@ DefineRelation(CreateStmt *stmt)
|
||||
List *constraints;
|
||||
|
||||
if (strlen(stmt->relname) >= NAMEDATALEN)
|
||||
elog(ABORT, "the relation name %s is >= %d characters long", stmt->relname,
|
||||
elog(ERROR, "the relation name %s is >= %d characters long", stmt->relname,
|
||||
NAMEDATALEN);
|
||||
StrNCpy(relname, stmt->relname, NAMEDATALEN); /* make full length for
|
||||
* copy */
|
||||
@ -78,7 +78,7 @@ DefineRelation(CreateStmt *stmt)
|
||||
numberOfAttributes = length(schema);
|
||||
if (numberOfAttributes <= 0)
|
||||
{
|
||||
elog(ABORT, "DefineRelation: %s",
|
||||
elog(ERROR, "DefineRelation: %s",
|
||||
"please inherit from a relation or define an attribute");
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ DefineRelation(CreateStmt *stmt)
|
||||
for (i = 0; i < ncheck; i++)
|
||||
{
|
||||
if (strcmp(check[i].ccname, cdef->name) == 0)
|
||||
elog(ABORT, "DefineRelation: name (%s) of CHECK constraint duplicated", cdef->name);
|
||||
elog(ERROR, "DefineRelation: name (%s) of CHECK constraint duplicated", cdef->name);
|
||||
}
|
||||
check[ncheck].ccname = cdef->name;
|
||||
}
|
||||
@ -218,7 +218,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||
|
||||
if (!strcmp(coldef->colname, restdef->colname))
|
||||
{
|
||||
elog(ABORT, "attribute '%s' duplicated",
|
||||
elog(ERROR, "attribute '%s' duplicated",
|
||||
coldef->colname);
|
||||
}
|
||||
}
|
||||
@ -231,7 +231,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||
{
|
||||
if (!strcmp(strVal(lfirst(entry)), strVal(lfirst(rest))))
|
||||
{
|
||||
elog(ABORT, "relation '%s' duplicated",
|
||||
elog(ERROR, "relation '%s' duplicated",
|
||||
strVal(lfirst(entry)));
|
||||
}
|
||||
}
|
||||
@ -252,12 +252,12 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||
relation = heap_openr(name);
|
||||
if (relation == NULL)
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"MergeAttr: Can't inherit from non-existent superclass '%s'", name);
|
||||
}
|
||||
if (relation->rd_rel->relkind == 'S')
|
||||
{
|
||||
elog(ABORT, "MergeAttr: Can't inherit from sequence superclass '%s'", name);
|
||||
elog(ERROR, "MergeAttr: Can't inherit from sequence superclass '%s'", name);
|
||||
}
|
||||
tupleDesc = RelationGetTupleDescriptor(relation);
|
||||
constr = tupleDesc->constr;
|
||||
@ -567,7 +567,7 @@ checkAttrExists(char *attributeName, char *attributeType, List *schema)
|
||||
*/
|
||||
if (strcmp(attributeType, def->typename->name) != 0)
|
||||
{
|
||||
elog(ABORT, "%s and %s conflict for %s",
|
||||
elog(ERROR, "%s and %s conflict for %s",
|
||||
attributeType, def->typename->name, attributeName);
|
||||
}
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user