1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Change some ABORTS to ERROR. Add line number when COPY Failure.

This commit is contained in:
Bruce Momjian
1998-01-05 16:40:20 +00:00
parent 3d8820a364
commit deea69b90e
44 changed files with 571 additions and 589 deletions

View File

@ -64,7 +64,7 @@ CreateProceduralLanguage(CreatePLangStmt * stmt)
*/
if (!superuser())
{
elog(ABORT, "Only users with Postgres superuser privilege are "
elog(ERROR, "Only users with Postgres superuser privilege are "
"permitted to create procedural languages");
}
@ -80,7 +80,7 @@ CreateProceduralLanguage(CreatePLangStmt * stmt)
0, 0, 0);
if (HeapTupleIsValid(langTup))
{
elog(ABORT, "Language %s already exists", languageName);
elog(ERROR, "Language %s already exists", languageName);
}
/* ----------------
@ -96,12 +96,12 @@ CreateProceduralLanguage(CreatePLangStmt * stmt)
0);
if (!HeapTupleIsValid(procTup))
{
elog(ABORT, "PL handler function %s() doesn't exist",
elog(ERROR, "PL handler function %s() doesn't exist",
stmt->plhandler);
}
if (((Form_pg_proc) GETSTRUCT(procTup))->prorettype != InvalidOid)
{
elog(ABORT, "PL handler function %s() isn't of return type Opaque",
elog(ERROR, "PL handler function %s() isn't of return type Opaque",
stmt->plhandler);
}
@ -155,7 +155,7 @@ DropProceduralLanguage(DropPLangStmt * stmt)
*/
if (!superuser())
{
elog(ABORT, "Only users with Postgres superuser privilege are "
elog(ERROR, "Only users with Postgres superuser privilege are "
"permitted to drop procedural languages");
}
@ -171,12 +171,12 @@ DropProceduralLanguage(DropPLangStmt * stmt)
0, 0, 0);
if (!HeapTupleIsValid(langTup))
{
elog(ABORT, "Language %s doesn't exist", languageName);
elog(ERROR, "Language %s doesn't exist", languageName);
}
if (!((Form_pg_language) GETSTRUCT(langTup))->lanispl)
{
elog(ABORT, "Language %s isn't a created procedural language",
elog(ERROR, "Language %s isn't a created procedural language",
languageName);
}
@ -195,7 +195,7 @@ DropProceduralLanguage(DropPLangStmt * stmt)
if (!HeapTupleIsValid(tup))
{
elog(ABORT, "Language with name '%s' not found", languageName);
elog(ERROR, "Language with name '%s' not found", languageName);
}
heap_delete(rdesc, &(tup->t_ctid));