|
1 | 1 |
|
2 | 2 | Developer's Frequently Asked Questions (FAQ) for PostgreSQL |
3 | 3 |
|
4 | | - Last updated:Mon Jun 2 00:34:39 EDT 2003 |
| 4 | + Last updated:Wed Oct 29 21:40:18 EST 2003 |
5 | 5 |
|
6 | 6 | Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) |
7 | 7 |
|
|
34 | 34 | 2.3) Why do we use Node and List to make data structures? |
35 | 35 | 2.4) I just added a field to a structure. What else should I do? |
36 | 36 | 2.5) Why do we use palloc() and pfree() to allocate memory? |
37 | | - 2.6) What iselog()? |
| 37 | + 2.6) What isereport()? |
38 | 38 | 2.7) What is CommandCounterIncrement()? |
39 | 39 | _________________________________________________________________ |
40 | 40 |
|
@@ -687,20 +687,21 @@ List *i, *list; |
687 | 687 | are special non-query contexts that memory can be allocated in. These |
688 | 688 | affect when the allocated memory is freed by the backend. |
689 | 689 |
|
690 | | - 2.6) What iselog()? |
| 690 | + 2.6) What isereport()? |
691 | 691 |
|
692 | | -elog() is used to send messages to the front-end, and optionally |
| 692 | +ereport() is used to send messages to the front-end, and optionally |
693 | 693 | terminate the current query being processed. The first parameter is an |
694 | | - elog level of DEBUG (levels 1-5), LOG, INFO, NOTICE, ERROR, FATAL, or |
695 | | - PANIC. NOTICE prints on the user's terminal and the postmaster logs. |
696 | | - INFO prints only to the user's terminal and LOG prints only to the |
697 | | - server logs. (These can be changed from postgresql.conf.) ERROR prints |
698 | | - in both places, and terminates the current query, never returning from |
699 | | - the call. FATAL terminates the backend process. The remaining |
700 | | - parameters of elog are a printf-style set of parameters to print. |
701 | | - |
702 | | - elog(ERROR) frees most memory and open file descriptors so you don't |
703 | | - need to clean these up before the call. |
| 694 | + ereport level of DEBUG (levels 1-5), LOG, INFO, NOTICE, ERROR, FATAL, |
| 695 | + or PANIC. NOTICE prints on the user's terminal and the postmaster |
| 696 | + logs. INFO prints only to the user's terminal and LOG prints only to |
| 697 | + the server logs. (These can be changed from postgresql.conf.) ERROR |
| 698 | + prints in both places, and terminates the current query, never |
| 699 | + returning from the call. FATAL terminates the backend process. The |
| 700 | + remaining parameters of ereport are a printf-style set of parameters |
| 701 | + to print. |
| 702 | + |
| 703 | + ereport(ERROR) frees most memory and open file descriptors so you |
| 704 | + don't need to clean these up before the call. |
704 | 705 |
|
705 | 706 | 2.7) What is CommandCounterIncrement()? |
706 | 707 |
|
|