mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Change elog(WARN) to elog(ERROR) and elog(ABORT).
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.20 1997/11/25 22:06:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.21 1998/01/05 03:33:40 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* See acl.h.
|
||||
@@ -120,7 +120,7 @@ ChangeAcl(char *relname,
|
||||
*/
|
||||
relation = heap_openr(RelationRelationName);
|
||||
if (!RelationIsValid(relation))
|
||||
elog(WARN, "ChangeAcl: could not open '%s'??",
|
||||
elog(ABORT, "ChangeAcl: could not open '%s'??",
|
||||
RelationRelationName);
|
||||
fmgr_info(NameEqualRegProcedure, &relkey[0].sk_func, &relkey[0].sk_nargs);
|
||||
relkey[0].sk_argument = NameGetDatum(relname);
|
||||
@@ -134,7 +134,7 @@ ChangeAcl(char *relname,
|
||||
{
|
||||
heap_endscan(hsdp);
|
||||
heap_close(relation);
|
||||
elog(WARN, "ChangeAcl: class \"%s\" not found",
|
||||
elog(ABORT, "ChangeAcl: class \"%s\" not found",
|
||||
relname);
|
||||
return;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ get_grosysid(char *groname)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(WARN, "non-existent group \"%s\"", groname);
|
||||
elog(ABORT, "non-existent group \"%s\"", groname);
|
||||
}
|
||||
return (id);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode)
|
||||
case ACL_IDTYPE_WORLD:
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "aclcheck: bogus ACL id type: %d", idtype);
|
||||
elog(ABORT, "aclcheck: bogus ACL id type: %d", idtype);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
|
||||
htp = SearchSysCacheTuple(USENAME, PointerGetDatum(usename),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_aclcheck: user \"%s\" not found",
|
||||
elog(ABORT, "pg_aclcheck: user \"%s\" not found",
|
||||
usename);
|
||||
id = (AclId) ((Form_pg_user) GETSTRUCT(htp))->usesysid;
|
||||
|
||||
@@ -445,9 +445,9 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htp))
|
||||
{
|
||||
elog(WARN, "pg_aclcheck: class \"%s\" not found",
|
||||
elog(ABORT, "pg_aclcheck: class \"%s\" not found",
|
||||
relname);
|
||||
/* an elog(WARN) kills us, so no need to return anything. */
|
||||
/* an elog(ABORT) kills us, so no need to return anything. */
|
||||
}
|
||||
if (!heap_attisnull(htp, Anum_pg_class_relacl))
|
||||
{
|
||||
@@ -528,7 +528,7 @@ pg_ownercheck(char *usename,
|
||||
htp = SearchSysCacheTuple(USENAME, PointerGetDatum(usename),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_ownercheck: user \"%s\" not found",
|
||||
elog(ABORT, "pg_ownercheck: user \"%s\" not found",
|
||||
usename);
|
||||
user_id = (AclId) ((Form_pg_user) GETSTRUCT(htp))->usesysid;
|
||||
|
||||
@@ -550,30 +550,30 @@ pg_ownercheck(char *usename,
|
||||
{
|
||||
case OPROID:
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_ownercheck: operator %ld not found",
|
||||
elog(ABORT, "pg_ownercheck: operator %ld not found",
|
||||
PointerGetDatum(value));
|
||||
owner_id = ((OperatorTupleForm) GETSTRUCT(htp))->oprowner;
|
||||
break;
|
||||
case PRONAME:
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_ownercheck: function \"%s\" not found",
|
||||
elog(ABORT, "pg_ownercheck: function \"%s\" not found",
|
||||
value);
|
||||
owner_id = ((Form_pg_proc) GETSTRUCT(htp))->proowner;
|
||||
break;
|
||||
case RELNAME:
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_ownercheck: class \"%s\" not found",
|
||||
elog(ABORT, "pg_ownercheck: class \"%s\" not found",
|
||||
value);
|
||||
owner_id = ((Form_pg_class) GETSTRUCT(htp))->relowner;
|
||||
break;
|
||||
case TYPNAME:
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_ownercheck: type \"%s\" not found",
|
||||
elog(ABORT, "pg_ownercheck: type \"%s\" not found",
|
||||
value);
|
||||
owner_id = ((TypeTupleForm) GETSTRUCT(htp))->typowner;
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "pg_ownercheck: invalid cache id: %d",
|
||||
elog(ABORT, "pg_ownercheck: invalid cache id: %d",
|
||||
cacheid);
|
||||
break;
|
||||
}
|
||||
@@ -594,7 +594,7 @@ pg_func_ownercheck(char *usename,
|
||||
htp = SearchSysCacheTuple(USENAME, PointerGetDatum(usename),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_func_ownercheck: user \"%s\" not found",
|
||||
elog(ABORT, "pg_func_ownercheck: user \"%s\" not found",
|
||||
usename);
|
||||
user_id = (AclId) ((Form_pg_user) GETSTRUCT(htp))->usesysid;
|
||||
|
||||
@@ -635,7 +635,7 @@ pg_aggr_ownercheck(char *usename,
|
||||
htp = SearchSysCacheTuple(USENAME, PointerGetDatum(usename),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "pg_aggr_ownercheck: user \"%s\" not found",
|
||||
elog(ABORT, "pg_aggr_ownercheck: user \"%s\" not found",
|
||||
usename);
|
||||
user_id = (AclId) ((Form_pg_user) GETSTRUCT(htp))->usesysid;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.8 1997/12/06 22:57:03 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.9 1998/01/05 03:33:44 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This cruft is the server side of PQfn.
|
||||
@@ -199,7 +199,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
||||
* Since the validity of this structure is determined by whether the
|
||||
* funcid is OK, we clear the funcid here. It must not be set to the
|
||||
* correct value until we are about to return with a good struct
|
||||
* fp_info, since we can be interrupted (i.e., with an elog(WARN,
|
||||
* fp_info, since we can be interrupted (i.e., with an elog(ABORT,
|
||||
* ...)) at any time.
|
||||
*/
|
||||
MemSet((char *) fip, 0, (int) sizeof(struct fp_info));
|
||||
@@ -209,7 +209,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(func_htp))
|
||||
{
|
||||
elog(WARN, "update_fp_info: cache lookup for function %d failed",
|
||||
elog(ABORT, "update_fp_info: cache lookup for function %d failed",
|
||||
func_id);
|
||||
}
|
||||
pp = (Form_pg_proc) GETSTRUCT(func_htp);
|
||||
@@ -226,7 +226,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(type_htp))
|
||||
{
|
||||
elog(WARN, "update_fp_info: bad argument type %d for %d",
|
||||
elog(ABORT, "update_fp_info: bad argument type %d for %d",
|
||||
argtypes[i], func_id);
|
||||
}
|
||||
tp = (TypeTupleForm) GETSTRUCT(type_htp);
|
||||
@@ -241,7 +241,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(type_htp))
|
||||
{
|
||||
elog(WARN, "update_fp_info: bad return type %d for %d",
|
||||
elog(ABORT, "update_fp_info: bad return type %d for %d",
|
||||
rettype, func_id);
|
||||
}
|
||||
tp = (TypeTupleForm) GETSTRUCT(type_htp);
|
||||
@@ -267,7 +267,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
||||
*
|
||||
* RETURNS:
|
||||
* nothing of significance.
|
||||
* All errors result in elog(WARN,...).
|
||||
* All errors result in elog(ABORT,...).
|
||||
*/
|
||||
int
|
||||
HandleFunctionRequest()
|
||||
@@ -297,7 +297,7 @@ HandleFunctionRequest()
|
||||
|
||||
if (fip->nargs != nargs)
|
||||
{
|
||||
elog(WARN, "HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)",
|
||||
elog(ABORT, "HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)",
|
||||
nargs, fip->nargs);
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ HandleFunctionRequest()
|
||||
{ /* ... varlena */
|
||||
if (!(p = palloc(argsize + VARHDRSZ)))
|
||||
{
|
||||
elog(WARN, "HandleFunctionRequest: palloc failed");
|
||||
elog(ABORT, "HandleFunctionRequest: palloc failed");
|
||||
}
|
||||
VARSIZE(p) = argsize + VARHDRSZ;
|
||||
pq_getnchar(VARDATA(p), 0, argsize);
|
||||
@@ -338,7 +338,7 @@ HandleFunctionRequest()
|
||||
/* XXX cross our fingers and trust "argsize" */
|
||||
if (!(p = palloc(argsize)))
|
||||
{
|
||||
elog(WARN, "HandleFunctionRequest: palloc failed");
|
||||
elog(ABORT, "HandleFunctionRequest: palloc failed");
|
||||
}
|
||||
pq_getnchar(p, 0, argsize);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.57 1997/12/16 15:57:00 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.58 1998/01/05 03:33:46 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@@ -125,7 +125,7 @@ jmp_buf Warn_restart;
|
||||
sigjmp_buf Warn_restart;
|
||||
|
||||
#endif /* defined(nextstep) */
|
||||
int InWarn;
|
||||
int InErrorOrAbort;
|
||||
|
||||
extern int NBuffers;
|
||||
|
||||
@@ -728,7 +728,7 @@ pg_exec_query_dest(char *query_string,/* string to execute */
|
||||
* signal handler routines used in PostgresMain()
|
||||
*
|
||||
* handle_warn() is used to catch kill(getpid(),1) which
|
||||
* occurs when elog(WARN) is called.
|
||||
* occurs when elog(ABORT) is called.
|
||||
*
|
||||
* quickdie() occurs when signalled by the postmaster.
|
||||
* Some backend has bought the farm,
|
||||
@@ -774,7 +774,7 @@ die(SIGNAL_ARGS)
|
||||
static void
|
||||
FloatExceptionHandler(SIGNAL_ARGS)
|
||||
{
|
||||
elog(WARN, "floating point exception!"
|
||||
elog(ABORT, "floating point exception!"
|
||||
" The last floating point operation either exceeded legal ranges"
|
||||
" or was a divide by zero");
|
||||
}
|
||||
@@ -1343,7 +1343,7 @@ PostgresMain(int argc, char *argv[])
|
||||
* so that the slaves signal the master to abort the transaction
|
||||
* rather than calling AbortCurrentTransaction() themselves.
|
||||
*
|
||||
* Note: elog(WARN) causes a kill(getpid(),1) to occur sending
|
||||
* Note: elog(ABORT) causes a kill(getpid(),1) to occur sending
|
||||
* us back here.
|
||||
* ----------------
|
||||
*/
|
||||
@@ -1352,7 +1352,7 @@ PostgresMain(int argc, char *argv[])
|
||||
|
||||
if (sigsetjmp(Warn_restart, 1) != 0)
|
||||
{
|
||||
InWarn = 1;
|
||||
InErrorOrAbort = 1;
|
||||
|
||||
time(&tim);
|
||||
|
||||
@@ -1363,7 +1363,7 @@ PostgresMain(int argc, char *argv[])
|
||||
|
||||
AbortCurrentTransaction();
|
||||
}
|
||||
InWarn = 0;
|
||||
InErrorOrAbort = 0;
|
||||
|
||||
/* ----------------
|
||||
* POSTGRES main processing loop begins here
|
||||
@@ -1372,7 +1372,7 @@ PostgresMain(int argc, char *argv[])
|
||||
if (IsUnderPostmaster == false)
|
||||
{
|
||||
puts("\nPOSTGRES backend interactive interface");
|
||||
puts("$Revision: 1.57 $ $Date: 1997/12/16 15:57:00 $");
|
||||
puts("$Revision: 1.58 $ $Date: 1998/01/05 03:33:46 $");
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
@@ -1565,7 +1565,7 @@ PostgresMain(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(WARN, "unknown frontend message was recieved");
|
||||
elog(ABORT, "unknown frontend message was recieved");
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.11 1997/09/18 20:22:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.12 1998/01/05 03:33:48 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -166,7 +166,7 @@ ProcessPortal(char *portalName,
|
||||
*/
|
||||
|
||||
if (PortalNameIsSpecial(portalName))
|
||||
elog(WARN,
|
||||
elog(ABORT,
|
||||
"The portal name %s is reserved for internal use",
|
||||
portalName);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.33 1998/01/01 05:48:14 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.34 1998/01/05 03:33:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -183,24 +183,24 @@ ProcessUtility(Node * parsetree,
|
||||
{
|
||||
relname = strVal(lfirst(arg));
|
||||
if (IsSystemRelationName(relname))
|
||||
elog(WARN, "class \"%s\" is a system catalog",
|
||||
elog(ABORT, "class \"%s\" is a system catalog",
|
||||
relname);
|
||||
rel = heap_openr(relname);
|
||||
if (RelationIsValid(rel))
|
||||
{
|
||||
if (stmt->sequence &&
|
||||
rel->rd_rel->relkind != RELKIND_SEQUENCE)
|
||||
elog(WARN, "Use DROP TABLE to drop table '%s'",
|
||||
elog(ABORT, "Use DROP TABLE to drop table '%s'",
|
||||
relname);
|
||||
if (!(stmt->sequence) &&
|
||||
rel->rd_rel->relkind == RELKIND_SEQUENCE)
|
||||
elog(WARN, "Use DROP SEQUENCE to drop sequence '%s'",
|
||||
elog(ABORT, "Use DROP SEQUENCE to drop sequence '%s'",
|
||||
relname);
|
||||
heap_close(rel);
|
||||
}
|
||||
#ifndef NO_SECURITY
|
||||
if (!pg_ownercheck(userName, relname, RELNAME))
|
||||
elog(WARN, "you do not own class \"%s\"",
|
||||
elog(ABORT, "you do not own class \"%s\"",
|
||||
relname);
|
||||
#endif
|
||||
}
|
||||
@@ -263,11 +263,11 @@ ProcessUtility(Node * parsetree,
|
||||
|
||||
relname = stmt->relname;
|
||||
if (IsSystemRelationName(relname))
|
||||
elog(WARN, "class \"%s\" is a system catalog",
|
||||
elog(ABORT, "class \"%s\" is a system catalog",
|
||||
relname);
|
||||
#ifndef NO_SECURITY
|
||||
if (!pg_ownercheck(userName, relname, RELNAME))
|
||||
elog(WARN, "you do not own class \"%s\"",
|
||||
elog(ABORT, "you do not own class \"%s\"",
|
||||
relname);
|
||||
#endif
|
||||
|
||||
@@ -327,7 +327,7 @@ ProcessUtility(Node * parsetree,
|
||||
{
|
||||
relname = strVal(lfirst(i));
|
||||
if (!pg_ownercheck(userName, relname, RELNAME))
|
||||
elog(WARN, "you do not own class \"%s\"",
|
||||
elog(ABORT, "you do not own class \"%s\"",
|
||||
relname);
|
||||
}
|
||||
#endif
|
||||
@@ -413,7 +413,7 @@ ProcessUtility(Node * parsetree,
|
||||
relname = stmt->object->relname;
|
||||
aclcheck_result = pg_aclcheck(relname, userName, ACL_RU);
|
||||
if (aclcheck_result != ACLCHECK_OK)
|
||||
elog(WARN, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]);
|
||||
elog(ABORT, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]);
|
||||
#endif
|
||||
commandTag = "CREATE";
|
||||
CHECK_IF_ABORTED();
|
||||
@@ -453,11 +453,11 @@ ProcessUtility(Node * parsetree,
|
||||
case INDEX:
|
||||
relname = stmt->name;
|
||||
if (IsSystemRelationName(relname))
|
||||
elog(WARN, "class \"%s\" is a system catalog index",
|
||||
elog(ABORT, "class \"%s\" is a system catalog index",
|
||||
relname);
|
||||
#ifndef NO_SECURITY
|
||||
if (!pg_ownercheck(userName, relname, RELNAME))
|
||||
elog(WARN, "%s: %s", relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
|
||||
elog(ABORT, "%s: %s", relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
|
||||
#endif
|
||||
RemoveIndex(relname);
|
||||
break;
|
||||
@@ -472,7 +472,7 @@ ProcessUtility(Node * parsetree,
|
||||
aclcheck_result = pg_aclcheck(relationName, userName, ACL_RU);
|
||||
if (aclcheck_result != ACLCHECK_OK)
|
||||
{
|
||||
elog(WARN, "%s: %s", relationName, aclcheck_error_strings[aclcheck_result]);
|
||||
elog(ABORT, "%s: %s", relationName, aclcheck_error_strings[aclcheck_result]);
|
||||
}
|
||||
#endif
|
||||
RemoveRewriteRule(rulename);
|
||||
@@ -494,7 +494,7 @@ ProcessUtility(Node * parsetree,
|
||||
ruleName = MakeRetrieveViewRuleName(viewName);
|
||||
relationName = RewriteGetRuleEventRel(ruleName);
|
||||
if (!pg_ownercheck(userName, relationName, RELNAME))
|
||||
elog(WARN, "%s: %s", relationName, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
|
||||
elog(ABORT, "%s: %s", relationName, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
|
||||
pfree(ruleName);
|
||||
#endif
|
||||
RemoveView(viewName);
|
||||
@@ -546,7 +546,7 @@ ProcessUtility(Node * parsetree,
|
||||
|
||||
case T_VersionStmt:
|
||||
{
|
||||
elog(WARN, "CREATE VERSION is not currently implemented");
|
||||
elog(ABORT, "CREATE VERSION is not currently implemented");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -609,7 +609,7 @@ ProcessUtility(Node * parsetree,
|
||||
filename = stmt->filename;
|
||||
closeAllVfds();
|
||||
if ((fp = AllocateFile(filename, "r")) == NULL)
|
||||
elog(WARN, "LOAD: could not open file %s", filename);
|
||||
elog(ABORT, "LOAD: could not open file %s", filename);
|
||||
FreeFile(fp);
|
||||
load_file(filename);
|
||||
}
|
||||
@@ -754,7 +754,7 @@ ProcessUtility(Node * parsetree,
|
||||
*
|
||||
*/
|
||||
default:
|
||||
elog(WARN, "ProcessUtility: command #%d unsupported",
|
||||
elog(ABORT, "ProcessUtility: command #%d unsupported",
|
||||
nodeTag(parsetree));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Routines for handling of 'SET var TO',
|
||||
* 'SHOW var' and 'RESET var' statements.
|
||||
*
|
||||
* $Id: variable.c,v 1.24 1997/12/04 23:17:13 thomas Exp $
|
||||
* $Id: variable.c,v 1.25 1998/01/05 03:33:50 momjian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -53,7 +53,7 @@ get_token(char **tok, char **val, const char *str)
|
||||
while (isspace(*str))
|
||||
str++;
|
||||
if (*str == ',' || *str == '=')
|
||||
elog(WARN, "Syntax error near (%s): empty setting", str);
|
||||
elog(ABORT, "Syntax error near (%s): empty setting", str);
|
||||
|
||||
/* end of string? then return NULL */
|
||||
if (!(*str))
|
||||
@@ -94,7 +94,7 @@ get_token(char **tok, char **val, const char *str)
|
||||
}
|
||||
else if ((val == NULL) || (*str != '='))
|
||||
{
|
||||
elog(WARN, "Syntax error near (%s)", str);
|
||||
elog(ABORT, "Syntax error near (%s)", str);
|
||||
};
|
||||
|
||||
str++; /* '=': get value */
|
||||
@@ -105,7 +105,7 @@ get_token(char **tok, char **val, const char *str)
|
||||
str++;
|
||||
|
||||
if (*str == ',' || !(*str))
|
||||
elog(WARN, "Syntax error near (=%s)", str);
|
||||
elog(ABORT, "Syntax error near (=%s)", str);
|
||||
|
||||
start = str;
|
||||
|
||||
@@ -131,7 +131,7 @@ get_token(char **tok, char **val, const char *str)
|
||||
if (*str == ',')
|
||||
return (++str);
|
||||
|
||||
elog(WARN, "Syntax error near (%s)", str);
|
||||
elog(ABORT, "Syntax error near (%s)", str);
|
||||
|
||||
return str;
|
||||
}
|
||||
@@ -172,10 +172,10 @@ parse_geqo(const char *value)
|
||||
|
||||
rest = get_token(&tok, &val, value);
|
||||
if (tok == NULL)
|
||||
elog(WARN, "Value undefined");
|
||||
elog(ABORT, "Value undefined");
|
||||
|
||||
if ((rest) && (*rest != '\0'))
|
||||
elog(WARN, "Unable to parse '%s'", value);
|
||||
elog(ABORT, "Unable to parse '%s'", value);
|
||||
|
||||
if (strcasecmp(tok, "on") == 0)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ parse_geqo(const char *value)
|
||||
{
|
||||
geqo_rels = pg_atoi(val, sizeof(int32), '\0');
|
||||
if (geqo_rels <= 1)
|
||||
elog(WARN, "Bad value for # of relations (%s)", val);
|
||||
elog(ABORT, "Bad value for # of relations (%s)", val);
|
||||
PFREE(val);
|
||||
}
|
||||
_use_geqo_ = true;
|
||||
@@ -194,11 +194,11 @@ parse_geqo(const char *value)
|
||||
else if (strcasecmp(tok, "off") == 0)
|
||||
{
|
||||
if ((val != NULL) && (*val != '\0'))
|
||||
elog(WARN, "%s does not allow a parameter", tok);
|
||||
elog(ABORT, "%s does not allow a parameter", tok);
|
||||
_use_geqo_ = false;
|
||||
}
|
||||
else
|
||||
elog(WARN, "Bad value for GEQO (%s)", value);
|
||||
elog(ABORT, "Bad value for GEQO (%s)", value);
|
||||
|
||||
PFREE(tok);
|
||||
return TRUE;
|
||||
@@ -242,7 +242,7 @@ parse_r_plans(const char *value)
|
||||
else if (strcasecmp(value, "off") == 0)
|
||||
_use_right_sided_plans_ = false;
|
||||
else
|
||||
elog(WARN, "Bad value for Right-sided Plans (%s)", value);
|
||||
elog(ABORT, "Bad value for Right-sided Plans (%s)", value);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ parse_date(const char *value)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(WARN, "Bad value for date style (%s)", tok);
|
||||
elog(ABORT, "Bad value for date style (%s)", tok);
|
||||
}
|
||||
PFREE(tok);
|
||||
}
|
||||
@@ -490,7 +490,7 @@ parse_timezone(const char *value)
|
||||
strcpy(tzbuf, "TZ=");
|
||||
strcat(tzbuf, tok);
|
||||
if (putenv(tzbuf) != 0)
|
||||
elog(WARN, "Unable to set TZ environment variable to %s", tok);
|
||||
elog(ABORT, "Unable to set TZ environment variable to %s", tok);
|
||||
|
||||
tzset();
|
||||
PFREE(tok);
|
||||
@@ -528,13 +528,13 @@ reset_timezone()
|
||||
strcpy(tzbuf, "TZ=");
|
||||
strcat(tzbuf, TZvalue);
|
||||
if (putenv(tzbuf) != 0)
|
||||
elog(WARN, "Unable to set TZ environment variable to %s", TZvalue);
|
||||
elog(ABORT, "Unable to set TZ environment variable to %s", TZvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(tzbuf, "=");
|
||||
if (putenv(tzbuf) != 0)
|
||||
elog(WARN, "Unable to clear TZ environment variable", NULL);
|
||||
elog(ABORT, "Unable to clear TZ environment variable", NULL);
|
||||
}
|
||||
tzset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user