PostgreSQL解読室:
errstart()/postgresql-8.1.4
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
このページを編集する際は、[[編集に関する方針]]に従ってく...
*概要 [#bf624511]
-対象:8.1.4
-言語:C
-宣言:[[postgresql-8.1.4/src/include/utils/elog.h]](ext...
-定義:[[postgresql-8.1.4/src/backend/port/ipc_test.c]]
-定義:[[postgresql-8.1.4/src/backend/utils/error/elog.c]]
**[[postgresql-8.1.4/src/backend/port/ipc_test.c]] [#wf33...
-elevelが20以上ならTRUE、それ以外はFALSEを返す。
-以下のバイナリでリンクされている。
--ipc_test(メイン関数[[main()/ipc_test/postgresql-8.1.4]...
**[[postgresql-8.1.4/src/backend/utils/error/elog.c]] [#a...
-(概要を書いてください。)
*引数 [#x4628c86]
**[[postgresql-8.1.4/src/backend/port/ipc_test.c]] [#wf33...
-int elevel -- これが20以上かどうか評価される。
-const char *filename -- 使用されない引数。
-int lineno -- 使用されない引数。
-const char *funcname -- 使用されない引数。
**[[postgresql-8.1.4/src/backend/utils/error/elog.c]] [#a...
-(引数の説明を書いてください。)
*実装 [#ucb7db76]
**[[postgresql-8.1.4/src/backend/port/ipc_test.c]] [#wf33...
bool
errstart(int elevel, const char *filename, int lineno,
const char *funcname)
{
return (elevel >= ERROR);
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
}
**[[postgresql-8.1.4/src/backend/utils/error/elog.c]] [#a...
bool
errstart(int elevel, const char *filename, int lineno,
const char *funcname)
{
ErrorData *edata;
-[[ErrorData/postgresql-8.1.4]] -- 以下のメンバを持つ構造...
-- elevelを、intとして定義
-- output_to_serverを、bool(charの別名)として定義
-- output_to_clientを、bool(charの別名)として定義
-- show_funcnameを、bool(charの別名)として定義
-- filenameを、const charへのポインタとして定義
-- linenoを、intとして定義
-- funcnameを、const charへのポインタとして定義
-- sqlerrcodeを、intとして定義
-- messageを、charへのポインタとして定義
-- detailを、charへのポインタとして定義
-- hintを、charへのポインタとして定義
-- contextを、charへのポインタとして定義
-- cursorposを、intとして定義
-- internalposを、intとして定義
-- internalqueryを、charへのポインタとして定義
-- saved_errnoを、intとして定義
bool output_to_server = false;
-[[bool/postgresql-8.1.4]] -- charの別名。
-[[false/postgresql-8.1.4]] -- 0をbool型(char型の別名)...
bool output_to_client = false;
-[[bool/postgresql-8.1.4]] -- charの別名。
-[[false/postgresql-8.1.4]] -- 0をbool型(char型の別名)...
int i;
/*
* Check some cases in which we want to promote an error...
* severe error. None of this logic applies for non-err...
*/
if (elevel >= ERROR)
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
{
/*
* If we are inside a critical section, all errors beco...
* errors. See miscadmin.h.
*/
if (CritSectionCount > 0)
-[[CritSectionCount/postgresql-8.1.4]] -- volatile uint32...
elevel = PANIC;
-[[PANIC/postgresql-8.1.4]] -- 定数22の別名。
/*
* Check reasons for treating ERROR as FATAL:
*
* 1. we have no handler to pass the error to (implies ...
* postmaster or in backend startup).
*
* 2. ExitOnAnyError mode switch is set (initdb uses th...
*
* 3. the error occurred after proc_exit has begun to r...
* proc_exit's responsibility to see that this doesn't ...
* infinite recursion!)
*/
if (elevel == ERROR)
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
{
if (PG_exception_stack == NULL ||
ExitOnAnyError ||
proc_exit_inprogress)
-[[PG_exception_stack/postgresql-8.1.4]] -- sigjmp_buf型...
-[[ExitOnAnyError/postgresql-8.1.4]] -- bool型(charの別...
-[[proc_exit_inprogress/postgresql-8.1.4]] -- データ型boo...
elevel = FATAL;
-[[FATAL/postgresql-8.1.4]] -- 定数21の別名。
}
/*
* If the error level is ERROR or more, errfinish is no...
* return to caller; therefore, if there is any stacked...
* in progress it will be lost. This is more or less o...
* do not want to have a FATAL or PANIC error downgrade...
* reporting process was interrupted by a lower-grade e...
* the stack and make sure we panic if panic is warrant...
*/
for (i = 0; i <= errordata_stack_depth; i++)
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
elevel = Max(elevel, errordata[i].elevel);
-[[Max()/postgresql-8.1.4]] -- 比較して大きなほうの値を返...
-[[errordata/postgresql-8.1.4]] -- データ型ErrorDataのsta...
--elevelを、intとして定義
--output_to_serverを、bool(charの別名)として定義
--output_to_clientを、bool(charの別名)として定義
--show_funcnameを、bool(charの別名)として定義
--filenameを、const charへのポインタとして定義
--linenoを、intとして定義
--funcnameを、const charへのポインタとして定義
--sqlerrcodeを、intとして定義
--messageを、charへのポインタとして定義
--detailを、charへのポインタとして定義
--hintを、charへのポインタとして定義
--contextを、charへのポインタとして定義
--cursorposを、intとして定義
--internalposを、intとして定義
--internalqueryを、charへのポインタとして定義
--saved_errnoを、intとして定義
}
/*
* Now decide whether we need to process this report at ...
* warning or less and not enabled for logging, just ret...
* starting up any error logging machinery.
*/
/* Determine whether message is enabled for server log o...
if (IsPostmasterEnvironment)
{
/* Complicated because LOG is sorted out-of-order for t...
if (elevel == LOG || elevel == COMMERROR)
-[[LOG/postgresql-8.1.4]] -- 定数15の別名。
-[[COMMERROR/postgresql-8.1.4]] -- 定数16の別名。
{
if (log_min_messages == LOG)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
-[[LOG/postgresql-8.1.4]] -- 定数15の別名。
output_to_server = true;
else if (log_min_messages < FATAL)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
-[[FATAL/postgresql-8.1.4]] -- 定数21の別名。
output_to_server = true;
}
else
{
/* elevel != LOG */
if (log_min_messages == LOG)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
-[[LOG/postgresql-8.1.4]] -- 定数15の別名。
{
if (elevel >= FATAL)
-[[FATAL/postgresql-8.1.4]] -- 定数21の別名。
output_to_server = true;
}
/* Neither is LOG */
else if (elevel >= log_min_messages)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
output_to_server = true;
}
}
else
{
/* In bootstrap/standalone case, do not sort LOG out-of...
output_to_server = (elevel >= log_min_messages);
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
}
/* Determine whether message is enabled for client outpu...
if (whereToSendOutput == DestRemote && elevel != COMMERR...
-[[whereToSendOutput/postgresql-8.1.4]] -- 以下の定数を定...
--DestNone -- 0
--DestDebug -- 1
--DestRemote -- 2
--DestRemoteExecute -- 3
--DestSPI -- 4
--DestTuplestore -- 5
-[[COMMERROR/postgresql-8.1.4]] -- 定数16の別名。
{
/*
* client_min_messages is honored only after we complet...
* authentication handshake. This is required both for...
* reasons and because many clients can't handle NOTICE...
* during authentication.
*/
if (ClientAuthInProgress)
-[[ClientAuthInProgress/postgresql-8.1.4]] -- bool型(cha...
output_to_client = (elevel >= ERROR);
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
else
output_to_client = (elevel >= client_min_messages ||
elevel == INFO);
-[[client_min_messages/postgresql-8.1.4]] -- 初期値NOTICE...
-[[INFO/postgresql-8.1.4]] --定数17の別名。
}
/* Skip processing effort if non-error message will not ...
if (elevel < ERROR && !output_to_server && !output_to_cl...
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
return false;
-[[false/postgresql-8.1.4]] -- 0をbool型(char型の別名)...
/*
* Okay, crank up a stack entry to store the info in.
*/
if (recursion_depth++ > 0 && elevel >= ERROR)
-[[recursion_depth/postgresql-8.1.4]] -- 初期値0のstatic ...
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
{
/*
* Ooops, error during error processing. Clear ErrorCo...
* discussed at top of file. We will not return to the...
* error's reporter or handler, so we don't need it.
*/
MemoryContextReset(ErrorContext);
-[[MemoryContextReset()/postgresql-8.1.4]]
--引数ErrorContextのメンバ->firstchildがNULLでなければ、[...
--引数ErrorContext配下の関数ポインタmethods->resetで示さ...
-[[ErrorContext/postgresql-8.1.4]] -- 下記メンバを持つ構...
--NodeTag列挙型の変数type
--下記メンバを持つ構造体型MemoryContextMethodsへのポイン...
---void*型の関数ポインタalloc
---void型の関数ポインタfree_p
---void*型の関数ポインタrealloc
---void型の関数ポインタinit
---void型の関数ポインタreset
---void型の関数ポインタdelete
---Size型の関数ポインタget_chunk_space
---bool型の関数ポインタis_empty
---void型の関数ポインタstats
---void型の関数ポインタcheck
--MemoryContextDataへのポインタparent(再帰的使用)
--MemoryContextDataへのポインタfirstchild(再帰的使用)
--MemoryContextDataへのポインタnextchild(再帰的使用)
--char型へのポインタname
/*
* If we recurse more than once, the problem might be s...
* in a context traceback routine. Abandon them too.
*/
if (recursion_depth > 2)
-[[recursion_depth/postgresql-8.1.4]] -- 初期値0のstatic ...
error_context_stack = NULL;
-[[error_context_stack/postgresql-8.1.4]] -- 下記メンバを...
--構造体ErrorContextCallback(再帰的定義)のメンバprevious
--void型の関数ポインタcallback
--voidへのポインタ型のメンバarg
}
if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE)
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
-[[ERRORDATA_STACK_SIZE/postgresql-8.1.4]] -- 定数5の別名。
{
/*
* Wups, stack not big enough. We treat this as a PANIC...
* because it suggests an infinite loop of errors durin...
* recovery.
*/
errordata_stack_depth = -1; /* make room on stack */
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE e...
-[[ereport()/postgresql-8.1.4]] -- 呼び出し元(再帰的使用)
-[[PANIC/postgresql-8.1.4]] -- 定数22の別名。
-[[errmsg_internal()/postgresql-8.1.4]]
}
/* Initialize data for this error frame */
edata = &errordata[errordata_stack_depth];
-[[errordata/postgresql-8.1.4]]
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
MemSet(edata, 0, sizeof(ErrorData));
edata->elevel = elevel;
edata->output_to_server = output_to_server;
edata->output_to_client = output_to_client;
edata->filename = filename;
edata->lineno = lineno;
edata->funcname = funcname;
/* Select default errcode based on elevel */
if (elevel >= ERROR)
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
-[[ERRCODE_INTERNAL_ERROR/postgresql-8.1.4]]
else if (elevel == WARNING)
-[[WARNING/postgresql-8.1.4]]
edata->sqlerrcode = ERRCODE_WARNING;
-[[ERRCODE_WARNING/postgresql-8.1.4]]
else
edata->sqlerrcode = ERRCODE_SUCCESSFUL_COMPLETION;
-[[ERRCODE_SUCCESSFUL_COMPLETION/postgresql-8.1.4]]
/* errno is saved here so that error parameter eval can'...
edata->saved_errno = errno;
recursion_depth--;
-[[recursion_depth/postgresql-8.1.4]] -- 初期値0のstatic ...
return true;
}
*呼出元 [#c24b415f]
-[[ereport()/postgresql-8.1.4]]
*備考 [#xa279604]
-[[同じ名前の下位関数が複数存在:errstart()/解読日記]]
([[postgresql-8.1.4/src/backend/utils/error/elog.c]]での...
* errstart --- begin an error-reporting cycle
*
* Create a stack entry and store the given parameters in...
* errmsg() and perhaps other routines will be called to ...
* the stack entry. Finally, errfinish() will be called ...
* the error report.
*
* Returns TRUE in normal case. Returns FALSE to short-c...
* report (if it's a warning or lower and not to be repor...
*履歴 [#a5612d96]
-作者:[[testnoda/ページ作者]]
-日付:????/?/?
|更新日|更新者|更新内容|
|2007/4/24|[[testnoda/ページ作者]]|解読を一旦中止([[関数...
||||
終了行:
このページを編集する際は、[[編集に関する方針]]に従ってく...
*概要 [#bf624511]
-対象:8.1.4
-言語:C
-宣言:[[postgresql-8.1.4/src/include/utils/elog.h]](ext...
-定義:[[postgresql-8.1.4/src/backend/port/ipc_test.c]]
-定義:[[postgresql-8.1.4/src/backend/utils/error/elog.c]]
**[[postgresql-8.1.4/src/backend/port/ipc_test.c]] [#wf33...
-elevelが20以上ならTRUE、それ以外はFALSEを返す。
-以下のバイナリでリンクされている。
--ipc_test(メイン関数[[main()/ipc_test/postgresql-8.1.4]...
**[[postgresql-8.1.4/src/backend/utils/error/elog.c]] [#a...
-(概要を書いてください。)
*引数 [#x4628c86]
**[[postgresql-8.1.4/src/backend/port/ipc_test.c]] [#wf33...
-int elevel -- これが20以上かどうか評価される。
-const char *filename -- 使用されない引数。
-int lineno -- 使用されない引数。
-const char *funcname -- 使用されない引数。
**[[postgresql-8.1.4/src/backend/utils/error/elog.c]] [#a...
-(引数の説明を書いてください。)
*実装 [#ucb7db76]
**[[postgresql-8.1.4/src/backend/port/ipc_test.c]] [#wf33...
bool
errstart(int elevel, const char *filename, int lineno,
const char *funcname)
{
return (elevel >= ERROR);
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
}
**[[postgresql-8.1.4/src/backend/utils/error/elog.c]] [#a...
bool
errstart(int elevel, const char *filename, int lineno,
const char *funcname)
{
ErrorData *edata;
-[[ErrorData/postgresql-8.1.4]] -- 以下のメンバを持つ構造...
-- elevelを、intとして定義
-- output_to_serverを、bool(charの別名)として定義
-- output_to_clientを、bool(charの別名)として定義
-- show_funcnameを、bool(charの別名)として定義
-- filenameを、const charへのポインタとして定義
-- linenoを、intとして定義
-- funcnameを、const charへのポインタとして定義
-- sqlerrcodeを、intとして定義
-- messageを、charへのポインタとして定義
-- detailを、charへのポインタとして定義
-- hintを、charへのポインタとして定義
-- contextを、charへのポインタとして定義
-- cursorposを、intとして定義
-- internalposを、intとして定義
-- internalqueryを、charへのポインタとして定義
-- saved_errnoを、intとして定義
bool output_to_server = false;
-[[bool/postgresql-8.1.4]] -- charの別名。
-[[false/postgresql-8.1.4]] -- 0をbool型(char型の別名)...
bool output_to_client = false;
-[[bool/postgresql-8.1.4]] -- charの別名。
-[[false/postgresql-8.1.4]] -- 0をbool型(char型の別名)...
int i;
/*
* Check some cases in which we want to promote an error...
* severe error. None of this logic applies for non-err...
*/
if (elevel >= ERROR)
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
{
/*
* If we are inside a critical section, all errors beco...
* errors. See miscadmin.h.
*/
if (CritSectionCount > 0)
-[[CritSectionCount/postgresql-8.1.4]] -- volatile uint32...
elevel = PANIC;
-[[PANIC/postgresql-8.1.4]] -- 定数22の別名。
/*
* Check reasons for treating ERROR as FATAL:
*
* 1. we have no handler to pass the error to (implies ...
* postmaster or in backend startup).
*
* 2. ExitOnAnyError mode switch is set (initdb uses th...
*
* 3. the error occurred after proc_exit has begun to r...
* proc_exit's responsibility to see that this doesn't ...
* infinite recursion!)
*/
if (elevel == ERROR)
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
{
if (PG_exception_stack == NULL ||
ExitOnAnyError ||
proc_exit_inprogress)
-[[PG_exception_stack/postgresql-8.1.4]] -- sigjmp_buf型...
-[[ExitOnAnyError/postgresql-8.1.4]] -- bool型(charの別...
-[[proc_exit_inprogress/postgresql-8.1.4]] -- データ型boo...
elevel = FATAL;
-[[FATAL/postgresql-8.1.4]] -- 定数21の別名。
}
/*
* If the error level is ERROR or more, errfinish is no...
* return to caller; therefore, if there is any stacked...
* in progress it will be lost. This is more or less o...
* do not want to have a FATAL or PANIC error downgrade...
* reporting process was interrupted by a lower-grade e...
* the stack and make sure we panic if panic is warrant...
*/
for (i = 0; i <= errordata_stack_depth; i++)
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
elevel = Max(elevel, errordata[i].elevel);
-[[Max()/postgresql-8.1.4]] -- 比較して大きなほうの値を返...
-[[errordata/postgresql-8.1.4]] -- データ型ErrorDataのsta...
--elevelを、intとして定義
--output_to_serverを、bool(charの別名)として定義
--output_to_clientを、bool(charの別名)として定義
--show_funcnameを、bool(charの別名)として定義
--filenameを、const charへのポインタとして定義
--linenoを、intとして定義
--funcnameを、const charへのポインタとして定義
--sqlerrcodeを、intとして定義
--messageを、charへのポインタとして定義
--detailを、charへのポインタとして定義
--hintを、charへのポインタとして定義
--contextを、charへのポインタとして定義
--cursorposを、intとして定義
--internalposを、intとして定義
--internalqueryを、charへのポインタとして定義
--saved_errnoを、intとして定義
}
/*
* Now decide whether we need to process this report at ...
* warning or less and not enabled for logging, just ret...
* starting up any error logging machinery.
*/
/* Determine whether message is enabled for server log o...
if (IsPostmasterEnvironment)
{
/* Complicated because LOG is sorted out-of-order for t...
if (elevel == LOG || elevel == COMMERROR)
-[[LOG/postgresql-8.1.4]] -- 定数15の別名。
-[[COMMERROR/postgresql-8.1.4]] -- 定数16の別名。
{
if (log_min_messages == LOG)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
-[[LOG/postgresql-8.1.4]] -- 定数15の別名。
output_to_server = true;
else if (log_min_messages < FATAL)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
-[[FATAL/postgresql-8.1.4]] -- 定数21の別名。
output_to_server = true;
}
else
{
/* elevel != LOG */
if (log_min_messages == LOG)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
-[[LOG/postgresql-8.1.4]] -- 定数15の別名。
{
if (elevel >= FATAL)
-[[FATAL/postgresql-8.1.4]] -- 定数21の別名。
output_to_server = true;
}
/* Neither is LOG */
else if (elevel >= log_min_messages)
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
output_to_server = true;
}
}
else
{
/* In bootstrap/standalone case, do not sort LOG out-of...
output_to_server = (elevel >= log_min_messages);
-[[log_min_messages/postgresql-8.1.4]] -- NOTICE(定数18)...
}
/* Determine whether message is enabled for client outpu...
if (whereToSendOutput == DestRemote && elevel != COMMERR...
-[[whereToSendOutput/postgresql-8.1.4]] -- 以下の定数を定...
--DestNone -- 0
--DestDebug -- 1
--DestRemote -- 2
--DestRemoteExecute -- 3
--DestSPI -- 4
--DestTuplestore -- 5
-[[COMMERROR/postgresql-8.1.4]] -- 定数16の別名。
{
/*
* client_min_messages is honored only after we complet...
* authentication handshake. This is required both for...
* reasons and because many clients can't handle NOTICE...
* during authentication.
*/
if (ClientAuthInProgress)
-[[ClientAuthInProgress/postgresql-8.1.4]] -- bool型(cha...
output_to_client = (elevel >= ERROR);
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
else
output_to_client = (elevel >= client_min_messages ||
elevel == INFO);
-[[client_min_messages/postgresql-8.1.4]] -- 初期値NOTICE...
-[[INFO/postgresql-8.1.4]] --定数17の別名。
}
/* Skip processing effort if non-error message will not ...
if (elevel < ERROR && !output_to_server && !output_to_cl...
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
return false;
-[[false/postgresql-8.1.4]] -- 0をbool型(char型の別名)...
/*
* Okay, crank up a stack entry to store the info in.
*/
if (recursion_depth++ > 0 && elevel >= ERROR)
-[[recursion_depth/postgresql-8.1.4]] -- 初期値0のstatic ...
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
{
/*
* Ooops, error during error processing. Clear ErrorCo...
* discussed at top of file. We will not return to the...
* error's reporter or handler, so we don't need it.
*/
MemoryContextReset(ErrorContext);
-[[MemoryContextReset()/postgresql-8.1.4]]
--引数ErrorContextのメンバ->firstchildがNULLでなければ、[...
--引数ErrorContext配下の関数ポインタmethods->resetで示さ...
-[[ErrorContext/postgresql-8.1.4]] -- 下記メンバを持つ構...
--NodeTag列挙型の変数type
--下記メンバを持つ構造体型MemoryContextMethodsへのポイン...
---void*型の関数ポインタalloc
---void型の関数ポインタfree_p
---void*型の関数ポインタrealloc
---void型の関数ポインタinit
---void型の関数ポインタreset
---void型の関数ポインタdelete
---Size型の関数ポインタget_chunk_space
---bool型の関数ポインタis_empty
---void型の関数ポインタstats
---void型の関数ポインタcheck
--MemoryContextDataへのポインタparent(再帰的使用)
--MemoryContextDataへのポインタfirstchild(再帰的使用)
--MemoryContextDataへのポインタnextchild(再帰的使用)
--char型へのポインタname
/*
* If we recurse more than once, the problem might be s...
* in a context traceback routine. Abandon them too.
*/
if (recursion_depth > 2)
-[[recursion_depth/postgresql-8.1.4]] -- 初期値0のstatic ...
error_context_stack = NULL;
-[[error_context_stack/postgresql-8.1.4]] -- 下記メンバを...
--構造体ErrorContextCallback(再帰的定義)のメンバprevious
--void型の関数ポインタcallback
--voidへのポインタ型のメンバarg
}
if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE)
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
-[[ERRORDATA_STACK_SIZE/postgresql-8.1.4]] -- 定数5の別名。
{
/*
* Wups, stack not big enough. We treat this as a PANIC...
* because it suggests an infinite loop of errors durin...
* recovery.
*/
errordata_stack_depth = -1; /* make room on stack */
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE e...
-[[ereport()/postgresql-8.1.4]] -- 呼び出し元(再帰的使用)
-[[PANIC/postgresql-8.1.4]] -- 定数22の別名。
-[[errmsg_internal()/postgresql-8.1.4]]
}
/* Initialize data for this error frame */
edata = &errordata[errordata_stack_depth];
-[[errordata/postgresql-8.1.4]]
-[[errordata_stack_depth/postgresql-8.1.4]] -- 初期値-1の...
MemSet(edata, 0, sizeof(ErrorData));
edata->elevel = elevel;
edata->output_to_server = output_to_server;
edata->output_to_client = output_to_client;
edata->filename = filename;
edata->lineno = lineno;
edata->funcname = funcname;
/* Select default errcode based on elevel */
if (elevel >= ERROR)
-[[ERROR/postgresql-8.1.4]] -- 定数20の別名。
edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
-[[ERRCODE_INTERNAL_ERROR/postgresql-8.1.4]]
else if (elevel == WARNING)
-[[WARNING/postgresql-8.1.4]]
edata->sqlerrcode = ERRCODE_WARNING;
-[[ERRCODE_WARNING/postgresql-8.1.4]]
else
edata->sqlerrcode = ERRCODE_SUCCESSFUL_COMPLETION;
-[[ERRCODE_SUCCESSFUL_COMPLETION/postgresql-8.1.4]]
/* errno is saved here so that error parameter eval can'...
edata->saved_errno = errno;
recursion_depth--;
-[[recursion_depth/postgresql-8.1.4]] -- 初期値0のstatic ...
return true;
}
*呼出元 [#c24b415f]
-[[ereport()/postgresql-8.1.4]]
*備考 [#xa279604]
-[[同じ名前の下位関数が複数存在:errstart()/解読日記]]
([[postgresql-8.1.4/src/backend/utils/error/elog.c]]での...
* errstart --- begin an error-reporting cycle
*
* Create a stack entry and store the given parameters in...
* errmsg() and perhaps other routines will be called to ...
* the stack entry. Finally, errfinish() will be called ...
* the error report.
*
* Returns TRUE in normal case. Returns FALSE to short-c...
* report (if it's a warning or lower and not to be repor...
*履歴 [#a5612d96]
-作者:[[testnoda/ページ作者]]
-日付:????/?/?
|更新日|更新者|更新内容|
|2007/4/24|[[testnoda/ページ作者]]|解読を一旦中止([[関数...
||||
ページ名: