From 92b1ab75d4059ff2b4d936e5bd36a574da73f0b2 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 6 Mar 2002 06:44:33 +0000 Subject: [PATCH] Update docs for new INFO, NOTICE, WARNING elog() levels. --- doc/src/sgml/maintenance.sgml | 4 ++-- doc/src/sgml/perform.sgml | 16 ++++++++-------- doc/src/sgml/runtime.sgml | 24 ++++++++++++------------ doc/src/sgml/spi.sgml | 28 ++++++++++++++-------------- doc/src/sgml/trigger.sgml | 28 ++++++++++++++-------------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 68a978b6ff..49e41b1433 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -1,5 +1,5 @@ @@ -335,7 +335,7 @@ SELECT datname, age(datfrozenxid) FROM pg_database; play=# vacuum; -NOTICE: Some databases have not been vacuumed in 1613770184 transactions. +WARNING: Some databases have not been vacuumed in 1613770184 transactions. Better vacuum them within 533713463 transactions, or you may have a wraparound failure. VACUUM diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index be161ead74..d4f0c9bcd7 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -1,5 +1,5 @@ @@ -96,7 +96,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.16 2002/01/20 22:19:56 pet regression=# EXPLAIN SELECT * FROM tenk1; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Seq Scan on tenk1 (cost=0.00..333.00 rows=10000 width=148) @@ -120,7 +120,7 @@ SELECT * FROM pg_class WHERE relname = 'tenk1'; regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 1000; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Seq Scan on tenk1 (cost=0.00..358.00 rows=1007 width=148) @@ -145,7 +145,7 @@ Seq Scan on tenk1 (cost=0.00..358.00 rows=1007 width=148) regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 50; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.09 rows=49 width=148) @@ -164,7 +164,7 @@ Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.09 rows=49 width=148) regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 50 AND regression-# stringu1 = 'xxx'; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.22 rows=1 width=148) @@ -179,7 +179,7 @@ Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.22 rows=1 width=148) regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 50 regression-# AND t1.unique2 = t2.unique2; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Nested Loop (cost=0.00..330.41 rows=49 width=296) -> Index Scan using tenk1_unique1 on tenk1 t1 @@ -227,7 +227,7 @@ regression=# set enable_nestloop = off; SET VARIABLE regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 50 regression-# AND t1.unique2 = t2.unique2; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Hash Join (cost=181.22..564.83 rows=49 width=296) -> Seq Scan on tenk2 t2 @@ -260,7 +260,7 @@ Hash Join (cost=181.22..564.83 rows=49 width=296) regression=# EXPLAIN ANALYZE regression-# SELECT * FROM tenk1 t1, tenk2 t2 regression-# WHERE t1.unique1 < 50 AND t1.unique2 = t2.unique2; -NOTICE: QUERY PLAN: +INFO: QUERY PLAN: Nested Loop (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows=50 loops=1) -> Index Scan using tenk1_unique1 on tenk1 t1 diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 2ce788b1ea..7e17a28d51 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -139,13 +139,13 @@ postgres$ initdb -D /usr/local/pgsql/data One surprise you might encounter while running initdb is a notice similar to this one: -NOTICE: Initializing database with en_US collation order. +WARNING: Initializing database with en_US collation order. This locale setting will prevent use of index optimization for LIKE and regexp searches. If you are concerned about speed of such queries, you may wish to set LC_COLLATE to "C" and re-initdb. For more information see the Administrator's Guide. - This notice is intended to warn you that the currently selected locale + This is intended to warn you that the currently selected locale will cause indexes to be sorted in an order that prevents them from being used for LIKE and regular-expression searches. If you need good performance of such searches, you should set your current locale @@ -821,10 +821,10 @@ env PGOPTIONS='-c geqo=off' psql default is NOTICE. Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, - ERROR, LOG, FATAL, - PANIC. Later values send less detail to the logs. - LOG has a different precedence here than in - CLIENT_MIN_MESSAGES. + WARNING, ERROR, LOG, + FATAL, and PANIC. Later values send less + detail to the logs. LOG has a different precedence + here than in CLIENT_MIN_MESSAGES. @@ -834,13 +834,13 @@ env PGOPTIONS='-c geqo=off' psql This controls how much detail is written to the client. The - default is INFO. Valid values are + default is NOTICE. Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, LOG, - INFO, NOTICE, ERROR, - FATAL, PANIC. Later values send less - information to the user. literal>LOG has a different - precedence here than in SERVER_MIN_MESSAGES. + NOTICE, WARNING, and ERROR. + Later values send less information to the user. LOG + has a different precedence here than in + SERVER_MIN_MESSAGES. diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml index 0e71b9381e..533a0f2979 100644 --- a/doc/src/sgml/spi.sgml +++ b/doc/src/sgml/spi.sgml @@ -1,5 +1,5 @@ @@ -3801,7 +3801,7 @@ execq(text *sql, int cnt) proc = SPI_processed; /* * If this is SELECT and some tuple(s) fetched - - * returns tuples to the caller via elog (NOTICE). + * returns tuples to the caller via elog (INFO). */ if ( ret == SPI_OK_SELECT && SPI_processed > 0 ) { @@ -3818,7 +3818,7 @@ execq(text *sql, int cnt) sprintf(buf + strlen (buf), " %s%s", SPI_getvalue(tuple, tupdesc, i), (i == tupdesc->natts) ? " " : " |"); - elog (NOTICE, "EXECQ: %s", buf); + elog (INFO, "EXECQ: %s", buf); } } @@ -3850,9 +3850,9 @@ execq vac=> INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)',0)); INSERT 167631 1 vac=> SELECT execq('SELECT * FROM a',0); -NOTICE:EXECQ: 0 <<< inserted by execq +INFO: EXECQ: 0 <<< inserted by execq -NOTICE:EXECQ: 1 <<< value returned by execq and inserted by upper INSERT +INFO: EXECQ: 1 <<< value returned by execq and inserted by upper INSERT execq ----- @@ -3866,11 +3866,11 @@ execq (1 row) vac=> SELECT execq('SELECT * FROM a', 10); -NOTICE:EXECQ: 0 +INFO: EXECQ: 0 -NOTICE:EXECQ: 1 +INFO: EXECQ: 1 -NOTICE:EXECQ: 2 <<< 0 + 2, only one tuple inserted - as specified +INFO: EXECQ: 2 <<< 0 + 2, only one tuple inserted - as specified execq ----- @@ -3888,7 +3888,7 @@ x (1 row) vac=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1); -NOTICE:EXECQ: 0 +INFO: EXECQ: 0 INSERT 167713 1 vac=> SELECT * FROM a; x @@ -3900,11 +3900,11 @@ x -- This demonstrates data changes visibility rule: vac=> INSERT INTO a SELECT execq('SELECT * FROM a', 0) * x FROM a; -NOTICE:EXECQ: 1 -NOTICE:EXECQ: 2 -NOTICE:EXECQ: 1 -NOTICE:EXECQ: 2 -NOTICE:EXECQ: 2 +INFO: EXECQ: 1 +INFO: EXECQ: 2 +INFO: EXECQ: 1 +INFO: EXECQ: 2 +INFO: EXECQ: 2 INSERT 0 2 vac=> SELECT * FROM a; x diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml index 10a49244b4..d2441ce08b 100644 --- a/doc/src/sgml/trigger.sgml +++ b/doc/src/sgml/trigger.sgml @@ -1,5 +1,5 @@ @@ -487,7 +487,7 @@ trigf(PG_FUNCTION_ARGS) /* Connect to SPI manager */ if ((ret = SPI_connect()) < 0) - elog(NOTICE, "trigf (fired %s): SPI_connect returned %d", when, ret); + elog(INFO, "trigf (fired %s): SPI_connect returned %d", when, ret); /* Get number of tuples in relation */ ret = SPI_exec("SELECT count(*) FROM ttest", 0); @@ -535,7 +535,7 @@ vac=> CREATE TRIGGER tafter AFTER INSERT OR UPDATE OR DELETE ON ttest FOR EACH ROW EXECUTE PROCEDURE trigf(); CREATE vac=> INSERT INTO ttest VALUES (NULL); -NOTICE:trigf (fired before): there are 0 tuples in ttest +WARNING: trigf (fired before): there are 0 tuples in ttest INSERT 0 0 -- Insertion skipped and AFTER trigger is not fired @@ -546,8 +546,8 @@ x (0 rows) vac=> INSERT INTO ttest VALUES (1); -NOTICE:trigf (fired before): there are 0 tuples in ttest -NOTICE:trigf (fired after ): there are 1 tuples in ttest +INFO: trigf (fired before): there are 0 tuples in ttest +INFO: trigf (fired after ): there are 1 tuples in ttest ^^^^^^^^ remember what we said about visibility. INSERT 167793 1 @@ -558,8 +558,8 @@ x (1 row) vac=> INSERT INTO ttest SELECT x * 2 FROM ttest; -NOTICE:trigf (fired before): there are 1 tuples in ttest -NOTICE:trigf (fired after ): there are 2 tuples in ttest +INFO: trigf (fired before): there are 1 tuples in ttest +INFO: trigf (fired after ): there are 2 tuples in ttest ^^^^^^^^ remember what we said about visibility. INSERT 167794 1 @@ -571,11 +571,11 @@ x (2 rows) vac=> UPDATE ttest SET x = null WHERE x = 2; -NOTICE:trigf (fired before): there are 2 tuples in ttest +INFO: trigf (fired before): there are 2 tuples in ttest UPDATE 0 vac=> UPDATE ttest SET x = 4 WHERE x = 2; -NOTICE:trigf (fired before): there are 2 tuples in ttest -NOTICE:trigf (fired after ): there are 2 tuples in ttest +INFO: trigf (fired before): there are 2 tuples in ttest +INFO: trigf (fired after ): there are 2 tuples in ttest UPDATE 1 vac=> SELECT * FROM ttest; x @@ -585,10 +585,10 @@ x (2 rows) vac=> DELETE FROM ttest; -NOTICE:trigf (fired before): there are 2 tuples in ttest -NOTICE:trigf (fired after ): there are 1 tuples in ttest -NOTICE:trigf (fired before): there are 1 tuples in ttest -NOTICE:trigf (fired after ): there are 0 tuples in ttest +INFO: trigf (fired before): there are 2 tuples in ttest +INFO: trigf (fired after ): there are 1 tuples in ttest +INFO: trigf (fired before): there are 1 tuples in ttest +INFO: trigf (fired after ): there are 0 tuples in ttest ^^^^^^^^ remember what we said about visibility. DELETE 2 -- 2.11.0