Skip to content

Commit 17d819c

Browse files
committed
Fix for recusive exit call from Massimo.
1 parent 32edd98 commit 17d819c

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

src/backend/storage/ipc/ipc.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.40 1999/10/10 16:53:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.41 1999/11/06 17:01:28 momjian Exp $
1111
*
1212
* NOTES
1313
*
@@ -115,14 +115,13 @@ proc_exit(int code)
115115
TPRINTF(TRACE_VERBOSE, "proc_exit(%d) [#%d]", code, proc_exit_inprogress);
116116

117117
/*
118-
* If proc_exit is called too many times something bad is happenig, so
119-
* exit immediately.
118+
* If proc_exit is called too many times something bad is happening, so
119+
* exit immediately. This is crafted in two if's for a reason.
120120
*/
121-
if (proc_exit_inprogress > 9)
122-
{
121+
if (proc_exit_inprogress == 9)
123122
elog(ERROR, "infinite recursion in proc_exit");
123+
if (proc_exit_inprogress >= 9)
124124
goto exit;
125-
}
126125

127126
/* ----------------
128127
* if proc_exit_inprocess is true, then it means that we

src/bin/psql/sql_help.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ struct _helpStruct
1414

1515

1616
static struct _helpStruct QL_HELP[] = {
17-
{ "TRUNCATE",
18-
"Empty a table",
19-
"TRUNCATE [ TABLE ] name" },
20-
2117
{ "ABORT",
2218
"Aborts the current transaction",
2319
"ABORT [ WORK | TRANSACTION ]" },
@@ -42,6 +38,10 @@ static struct _helpStruct QL_HELP[] = {
4238
"Gives storage clustering advice to the server",
4339
"CLUSTER indexname ON table" },
4440

41+
{ "COMMENT",
42+
"Add comment to an object",
43+
"COMMENT ON\n[\n [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ]\n object_name |\n COLUMN table_name.column_name|\n AGGREGATE agg_name agg_type|\n FUNCTION func_name (arg1, arg2, ...)|\n OPERATOR op (leftoperand_type rightoperand_type) |\n TRIGGER trigger_name ON table_name\n] IS 'text'" },
44+
4545
{ "COMMIT",
4646
"Commits the current transaction",
4747
"COMMIT [ WORK | TRANSACTION ]" },
@@ -118,10 +118,6 @@ static struct _helpStruct QL_HELP[] = {
118118
"Removes the definition of an aggregate function",
119119
"DROP AGGREGATE name type" },
120120

121-
{ "FETCH",
122-
"Gets rows using a cursor",
123-
"FETCH [ selector ] [ count ] { IN | FROM } cursor\nFETCH [ RELATIVE ] [ { [ # | ALL | NEXT | PRIOR ] } ] FROM ] cursor" },
124-
125121
{ "DROP DATABASE",
126122
"Destroys an existing database",
127123
"DROP DATABASE name" },
@@ -170,10 +166,18 @@ static struct _helpStruct QL_HELP[] = {
170166
"Removes an existing view from a database",
171167
"DROP VIEW name" },
172168

169+
{ "END",
170+
"Commits the current transaction",
171+
"END [ WORK | TRANSACTION ]" },
172+
173173
{ "EXPLAIN",
174174
"Shows statement execution details",
175175
"EXPLAIN [ VERBOSE ] query" },
176176

177+
{ "FETCH",
178+
"Gets rows using a cursor",
179+
"FETCH [ selector ] [ count ] { IN | FROM } cursor\nFETCH [ RELATIVE ] [ { [ # | ALL | NEXT | PRIOR ] } ] FROM ] cursor" },
180+
177181
{ "GRANT",
178182
"Grants access privilege to a user, a group or all users",
179183
"GRANT privilege [, ...] ON object [, ...]\n TO { PUBLIC | GROUP group | username }" },
@@ -230,6 +234,10 @@ static struct _helpStruct QL_HELP[] = {
230234
"Shows run-time parameters for session",
231235
"SHOW keyword" },
232236

237+
{ "TRUNCATE",
238+
"Empty a table",
239+
"TRUNCATE [ TABLE ] name" },
240+
233241
{ "UNLISTEN",
234242
"Stop listening for notification",
235243
"UNLISTEN { notifyname | * }" },
@@ -242,14 +250,6 @@ static struct _helpStruct QL_HELP[] = {
242250
"Clean and analyze a Postgres database",
243251
"VACUUM [ VERBOSE ] [ ANALYZE ] [ table ]\nVACUUM [ VERBOSE ] ANALYZE [ ER\">tBLE> [ (column [, ...] ) ] ]" },
244252

245-
{ "END",
246-
"Commits the current transaction",
247-
"END [ WORK | TRANSACTION ]" },
248-
249-
{ "COMMENT",
250-
"Add comment to an object",
251-
"COMMENT ON\n[\n [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ]\n object_name |\n COLUMN table_name.column_name|\n AGGREGATE agg_name agg_type|\n FUNCTION func_name (arg1, arg2, ...)|\n OPERATOR op (leftoperand_type rightoperand_type) |\n TRIGGER trigger_name ON table_name\n] IS 'text'" },
252-
253253

254254
{ NULL, NULL, NULL } /* End of list marker */
255255
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy