summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorBruce Momjian2002-03-02 21:39:36 +0000
committerBruce Momjian2002-03-02 21:39:36 +0000
commita033daf5663944872080f1f52deb2ffcb40f4042 (patch)
tree660da56fcf1f2d1f9e8ea31610f741bed3a8d778 /src/pl
parent8d8aa931ef5a3489764de222b1bfe43463d58a13 (diff)
Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plperl/eloglvl.c2
-rw-r--r--src/pl/plpgsql/src/gram.y4
-rw-r--r--src/pl/plpython/plpython.c24
-rw-r--r--src/pl/tcl/pltcl.c4
4 files changed, 17 insertions, 17 deletions
diff --git a/src/pl/plperl/eloglvl.c b/src/pl/plperl/eloglvl.c
index 03353a103e..23289479cd 100644
--- a/src/pl/plperl/eloglvl.c
+++ b/src/pl/plperl/eloglvl.c
@@ -13,7 +13,7 @@
int
elog_DEBUG(void)
{
- return DEBUG;
+ return LOG;
}
int
diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y
index 913d381144..38544b2108 100644
--- a/src/pl/plpgsql/src/gram.y
+++ b/src/pl/plpgsql/src/gram.y
@@ -4,7 +4,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.29 2001/11/29 22:57:37 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.30 2002/03/02 21:39:35 momjian Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -1207,7 +1207,7 @@ raise_level : K_EXCEPTION
}
| K_DEBUG
{
- $$ = DEBUG;
+ $$ = DEBUG5;
}
;
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 056f01f19e..b8ccbe9f52 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -29,7 +29,7 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.13 2001/11/16 18:04:31 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.14 2002/03/02 21:39:35 momjian Exp $
*
*********************************************************************
*/
@@ -407,7 +407,7 @@ plpython_call_handler(PG_FUNCTION_ARGS)
}
else
PLy_restart_in_progress += 1;
- if (proc)
+ if (proc)
{
Py_DECREF(proc->me);
}
@@ -2501,7 +2501,7 @@ PLy_init_plpy(void)
* New RExec methods
*/
-PyObject*
+PyObject*
PLy_r_open(PyObject *self, PyObject* args)
{
PyErr_SetString(PyExc_IOError, "can't open files in restricted mode");
@@ -2559,7 +2559,7 @@ PLy_init_safe_interp(void)
rexec_dict = ((PyClassObject*)rexec)->cl_dict;
/*
- * tweak the list of permitted modules, posix and sys functions
+ * tweak the list of permitted modules, posix and sys functions
*/
PyDict_SetItemString(rexec_dict, "ok_builtin_modules", PLy_importable_modules);
PyDict_SetItemString(rexec_dict, "ok_posix_names", PLy_ok_posix_names);
@@ -2596,7 +2596,7 @@ populate_methods(PyObject *klass, PyMethodDef *methods)
for ( ; methods->ml_name; ++methods) {
- /* get a wrapper for the built-in function */
+ /* get a wrapper for the built-in function */
PyObject *func = PyCFunction_New(methods, NULL);
PyObject *meth;
int status;
@@ -2604,14 +2604,14 @@ populate_methods(PyObject *klass, PyMethodDef *methods)
if (!func)
return -1;
- /* turn the function into an unbound method */
+ /* turn the function into an unbound method */
if (!(meth = PyMethod_New(func, NULL, klass))) {
Py_DECREF(func);
return -1;
}
/* add method to dictionary */
- status = PyDict_SetItemString( ((PyClassObject*)klass)->cl_dict,
+ status = PyDict_SetItemString( ((PyClassObject*)klass)->cl_dict,
methods->ml_name, meth);
Py_DECREF(meth);
Py_DECREF(func);
@@ -2632,7 +2632,7 @@ static PyObject *PLy_log(int, PyObject *, PyObject *);
PyObject *
PLy_debug(PyObject * self, PyObject * args)
{
- return PLy_log(DEBUG, self, args);
+ return PLy_log(LOG, self, args);
}
PyObject *
@@ -2690,7 +2690,7 @@ PLy_log(volatile int level, PyObject * self, PyObject * args)
}
/*
- * ok, this is a NOTICE, or DEBUG message
+ * ok, this is a NOTICE, or LOG message
*
* but just in case DON'T long jump out of the interpreter!
*/
@@ -2732,9 +2732,9 @@ PLy_log(volatile int level, PyObject * self, PyObject * args)
char *PLy_procedure_name(PLyProcedure *proc)
{
- if ( proc == NULL )
- return "<unknown procedure>";
- return proc->proname;
+ if ( proc == NULL )
+ return "<unknown procedure>";
+ return proc->proname;
}
/* output a python traceback/exception via the postgresql elog
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 336b837c96..96bf073ed4 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.49 2002/01/24 19:31:36 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.50 2002/03/02 21:39:35 momjian Exp $
*
**********************************************************************/
@@ -1268,7 +1268,7 @@ pltcl_elog(ClientData cdata, Tcl_Interp *interp,
else if (strcmp(argv[1], "FATAL") == 0)
level = FATAL;
else if (strcmp(argv[1], "DEBUG") == 0)
- level = DEBUG;
+ level = DEBUG1;
else
{
Tcl_AppendResult(interp, "Unknown elog level '", argv[1],