diff options
| author | Bruce Momjian | 1998-09-01 04:40:42 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1998-09-01 04:40:42 +0000 |
| commit | fa1a8d6a97068295fe30ac646aec7493a6305bc2 (patch) | |
| tree | 645f7cef3c78fbab4d6d7bbc7c9a61ad2893d273 /src/backend/tcop | |
| parent | af74855a608da4cd7ef88ceb2241ec1c75537f39 (diff) | |
OK, folks, here is the pgindent output.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/dest.c | 10 | ||||
| -rw-r--r-- | src/backend/tcop/fastpath.c | 6 | ||||
| -rw-r--r-- | src/backend/tcop/postgres.c | 218 | ||||
| -rw-r--r-- | src/backend/tcop/pquery.c | 4 | ||||
| -rw-r--r-- | src/backend/tcop/utility.c | 90 |
5 files changed, 165 insertions, 163 deletions
diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index 11ba43f2e5d..0c1a7c530fd 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.22 1998/09/01 03:25:38 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.23 1998/09/01 04:32:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -172,8 +172,8 @@ NullCommand(CommandDest dest) { switch (dest) { - case RemoteInternal: - case Remote: + case RemoteInternal: + case Remote: { /* ---------------- * tell the fe that we saw an empty query string @@ -206,8 +206,8 @@ ReadyForQuery(CommandDest dest) { switch (dest) { - case RemoteInternal: - case Remote: + case RemoteInternal: + case Remote: { if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2) pq_putnchar("Z", 1); diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 37c56d92007..ec609a5db7e 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.20 1998/09/01 03:25:40 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.21 1998/09/01 04:32:11 momjian Exp $ * * NOTES * This cruft is the server side of PQfn. @@ -350,7 +350,7 @@ HandleFunctionRequest() #else retval = NULL; -#endif /* NO_FASTPATH */ +#endif /* NO_FASTPATH */ /* free palloc'ed arguments */ for (i = 0; i < nargs; ++i) @@ -368,7 +368,7 @@ HandleFunctionRequest() SendFunctionResult(fid, retval, fip->retbyval, fip->retlen); #else SendFunctionResult(fid, retval, fip->retbyval, 0); -#endif /* NO_FASTPATH */ +#endif /* NO_FASTPATH */ if (!fip->retbyval) pfree(retval); diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 9839901d4dc..2d9479e7711 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.88 1998/09/01 03:25:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.89 1998/09/01 04:32:13 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -35,7 +35,7 @@ #include <errno.h> #if HAVE_SYS_SELECT_H #include <sys/select.h> -#endif /* aix */ +#endif /* aix */ #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> @@ -140,8 +140,8 @@ jmp_buf Warn_restart; #else sigjmp_buf Warn_restart; -#endif /* defined(nextstep) */ -bool InError; +#endif /* defined(nextstep) */ +bool InError; extern int NBuffers; @@ -162,7 +162,7 @@ int UseNewLine = 1; /* Use newlines query delimiters (the #else int UseNewLine = 0; /* Use EOF as query delimiters */ -#endif /* TCOP_DONTUSENEWLINE */ +#endif /* TCOP_DONTUSENEWLINE */ /* ---------------- * bushy tree plan flag: if true planner will generate bushy-tree @@ -445,27 +445,33 @@ pg_parse_and_plan(char *query_string, /* string to execute */ if (DebugPrintQuery) { - if (DebugPrintQuery > 3) { + if (DebugPrintQuery > 3) + { /* Print the query string as is if query debug level > 3 */ - TPRINTF(TRACE_QUERY, "query: %s",query_string); - } else { + TPRINTF(TRACE_QUERY, "query: %s", query_string); + } + else + { /* Print condensed query string to fit in one log line */ - char buff[8192+1]; - char c, - *s, - *d; - int n, - is_space=1; - - for (s=query_string,d=buff,n=0; (c=*s) && (n<8192); s++) { - switch (c) { + char buff[8192 + 1]; + char c, + *s, + *d; + int n, + is_space = 1; + + for (s = query_string, d = buff, n = 0; (c = *s) && (n < 8192); s++) + { + switch (c) + { case '\r': case '\n': case '\t': c = ' '; /* fall through */ case ' ': - if (is_space) continue; + if (is_space) + continue; is_space = 1; break; default: @@ -476,7 +482,7 @@ pg_parse_and_plan(char *query_string, /* string to execute */ n++; } *d = '\0'; - TPRINTF(TRACE_QUERY, "query: %s",buff); + TPRINTF(TRACE_QUERY, "query: %s", buff); } } @@ -549,17 +555,20 @@ pg_parse_and_plan(char *query_string, /* string to execute */ /* * Override ACL checking if requested */ - if (aclOverride) { - for (i = 0; i < querytree_list->len; i++) { - RangeTblEntry *rte; - List *l; + if (aclOverride) + { + for (i = 0; i < querytree_list->len; i++) + { + RangeTblEntry *rte; + List *l; querytree = querytree_list->qtrees[i]; if (querytree->commandType == CMD_UTILITY) continue; - foreach (l, querytree->rtable) { - rte = (RangeTblEntry *)lfirst(l); + foreach(l, querytree->rtable) + { + rte = (RangeTblEntry *) lfirst(l); rte->skipAcl = TRUE; } @@ -652,7 +661,8 @@ pg_parse_and_plan(char *query_string, /* string to execute */ * Check if the rewriting had thrown away anything * ---------- */ - if (querytree_list->len == 0) { + if (querytree_list->len == 0) + { free(querytree_list->qtrees); free(querytree_list); querytree_list = NULL; @@ -696,10 +706,8 @@ pg_exec_query_acl_override(char *query_string) void pg_exec_query_dest(char *query_string, /* string to execute */ CommandDest dest, /* where results should go */ - bool aclOverride) /* to give utility - * commands power of - * superusers - */ + bool aclOverride) /* to give utility commands power + * of superusers */ { List *plan_list; Plan *plan; @@ -713,7 +721,7 @@ pg_exec_query_dest(char *query_string, /* string to execute */ if (QueryCancel) CancelQuery(); - + /* pg_parse_and_plan could have failed */ if (querytree_list == NULL) return; @@ -740,11 +748,10 @@ pg_exec_query_dest(char *query_string, /* string to execute */ * because that is done in ProcessUtility. * ---------------- */ - if (DebugPrintQuery) { + if (DebugPrintQuery) TPRINTF(TRACE_QUERY, "ProcessUtility: %s", query_string); - } else if (Verbose) { + else if (Verbose) TPRINTF(TRACE_VERBOSE, "ProcessUtility"); - } ProcessUtility(querytree->utilityStmt, dest); @@ -787,9 +794,7 @@ pg_exec_query_dest(char *query_string, /* string to execute */ for (j = 0; j < _exec_repeat_; j++) { if (Verbose) - { TPRINTF(TRACE_VERBOSE, "ProcessQuery"); - } ProcessQuery(querytree, plan, dest); } @@ -880,7 +885,9 @@ QueryCancelHandler(SIGNAL_ARGS) void CancelQuery(void) { - /* QueryCancel flag will be reset in main loop, which we reach by + + /* + * QueryCancel flag will be reset in main loop, which we reach by * longjmp from elog(). */ elog(ERROR, "Query was cancelled."); @@ -923,28 +930,28 @@ usage(char *progname) int PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) { - bool flagC = false, - flagQ = false, - flagE = false, - flagEu = false; - int flag; + bool flagC = false, + flagQ = false, + flagE = false, + flagEu = false; + int flag; - char *DBName = NULL; - int errs = 0; + char *DBName = NULL; + int errs = 0; - char firstchar; - char parser_input[MAX_PARSE_BUFFER]; - char *userName; + char firstchar; + char parser_input[MAX_PARSE_BUFFER]; + char *userName; /* Used if verbose is set, must be initialized */ - char *remote_info = "interactive"; - char *remote_host = ""; - unsigned short remote_port = 0; + char *remote_info = "interactive"; + char *remote_host = ""; + unsigned short remote_port = 0; - char *DBDate = NULL; - extern int optind; - extern char *optarg; - extern short DebugLvl; + char *DBDate = NULL; + extern int optind; + extern char *optarg; + extern short DebugLvl; /* ---------------- * parse command line arguments @@ -992,14 +999,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) else if (strcasecmp(DBDate, "EURO") == 0) EuroDates = TRUE; } - + /* * Read default pg_options from file $DATADIR/pg_options. */ read_pg_options(0); - optind = 1; /* reset after postmaster usage */ - + optind = 1; /* reset after postmaster usage */ + while ((flag = getopt(argc, argv, "A:B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:")) != EOF) @@ -1007,7 +1014,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) { case 'A': /* ---------------- - * enable/disable assert checking. + * enable/disable assert checking. * ---------------- */ #ifdef USE_ASSERT_CHECKING @@ -1048,19 +1055,13 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) flagQ = false; DebugLvl = (short) atoi(optarg); if (DebugLvl >= 1) - { Verbose = DebugLvl; - } if (DebugLvl >= 2) - { - DebugPrintQuery = true; - } + DebugPrintQuery = true; if (DebugLvl >= 3) - { DebugPrintQuery = DebugLvl; - } if (DebugLvl >= 4) - { + { DebugPrintParse = true; DebugPrintPlan = true; DebugPrintRewrittenParsetree = true; @@ -1211,7 +1212,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) StatFp = stderr; break; - case 'T': + case 'T': parse_options(optarg); break; @@ -1252,7 +1253,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) case 'W': /* ---------------- - * wait N seconds to allow attach from a debugger + * wait N seconds to allow attach from a debugger * ---------------- */ sleep(atoi(optarg)); @@ -1352,33 +1353,38 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) /* * Find remote host name or address. */ - if (IsUnderPostmaster) { - switch (MyProcPort->raddr.sa.sa_family) { - struct hostent *host_ent; + if (IsUnderPostmaster) + { + switch (MyProcPort->raddr.sa.sa_family) + { + struct hostent *host_ent; - case AF_INET: + case AF_INET: remote_info = remote_host = malloc(48); remote_port = ntohs(MyProcPort->raddr.in.sin_port); strcpy(remote_host, inet_ntoa(MyProcPort->raddr.in.sin_addr)); - if (HostnameLookup) { + if (HostnameLookup) + { host_ent = \ - gethostbyaddr((char *)&MyProcPort->raddr.in.sin_addr, - sizeof(MyProcPort->raddr.in.sin_addr), + gethostbyaddr((char *) &MyProcPort->raddr.in.sin_addr, + sizeof(MyProcPort->raddr.in.sin_addr), AF_INET); - if (host_ent) { + if (host_ent) + { strncpy(remote_host, host_ent->h_name, 48); - *(remote_host+47) = '\0'; + *(remote_host + 47) = '\0'; } } - if (ShowPortNumber) { - remote_info = malloc(strlen(remote_host)+6); + if (ShowPortNumber) + { + remote_info = malloc(strlen(remote_host) + 6); sprintf(remote_info, "%s:%d", remote_host, remote_port); } break; - case AF_UNIX: + case AF_UNIX: remote_info = remote_host = "localhost"; break; - default: + default: remote_info = remote_host = "unknown"; break; } @@ -1388,8 +1394,9 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) * set process params for ps * ---------------- */ - if (IsUnderPostmaster) { - PS_INIT_STATUS(real_argc, real_argv, argv[0], + if (IsUnderPostmaster) + { + PS_INIT_STATUS(real_argc, real_argv, argv[0], remote_info, userName, DBName); PS_SET_STATUS("idle"); } @@ -1400,10 +1407,13 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) */ if (Verbose) { - if (Verbose == 1) { + if (Verbose == 1) + { TPRINTF(TRACE_VERBOSE, "started: host=%s user=%s database=%s", remote_host, userName, DBName); - } else { + } + else + { TPRINTF(TRACE_VERBOSE, "debug info:"); TPRINTF(TRACE_VERBOSE, "\tUser = %s", userName); TPRINTF(TRACE_VERBOSE, "\tRemoteHost = %s", remote_host); @@ -1449,32 +1459,28 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) #ifdef MULTIBYTE /* set default client encoding */ if (Verbose) - { puts("\treset_client_encoding().."); - } reset_client_encoding(); if (Verbose) - { puts("\treset_client_encoding() done."); - } #endif /* ---------------- - * Set up handler for cancel-request signal, and + * Set up handler for cancel-request signal, and * send this backend's cancellation info to the frontend. * This should not be done until we are sure startup is successful. * ---------------- */ - pqsignal(SIGHUP, read_pg_options); /* upate pg_options from file */ - pqsignal(SIGINT, QueryCancelHandler); /* cancel current query */ - pqsignal(SIGQUIT, handle_warn); /* handle error */ + pqsignal(SIGHUP, read_pg_options); /* upate pg_options from file */ + pqsignal(SIGINT, QueryCancelHandler); /* cancel current query */ + pqsignal(SIGQUIT, handle_warn); /* handle error */ pqsignal(SIGTERM, die); pqsignal(SIGPIPE, die); pqsignal(SIGUSR1, quickdie); - pqsignal(SIGUSR2, Async_NotifyHandler); /* flush also sinval cache */ - pqsignal(SIGCHLD, SIG_IGN); /* ignored, sent by LockOwners */ - pqsignal(SIGFPE, FloatExceptionHandler); + pqsignal(SIGUSR2, Async_NotifyHandler); /* flush also sinval cache */ + pqsignal(SIGCHLD, SIG_IGN); /* ignored, sent by LockOwners */ + pqsignal(SIGFPE, FloatExceptionHandler); if (whereToSendOutput == Remote && PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2) @@ -1521,7 +1527,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface"); - puts("$Revision: 1.88 $ $Date: 1998/09/01 03:25:41 $"); + puts("$Revision: 1.89 $ $Date: 1998/09/01 04:32:13 $"); } /* ---------------- @@ -1564,9 +1570,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) /* start an xact for this function invocation */ if (Verbose) - { TPRINTF(TRACE_VERBOSE, "StartTransactionCommand"); - } StartTransactionCommand(); HandleFunctionRequest(); @@ -1601,9 +1605,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) /* start an xact for this query */ if (Verbose) - { TPRINTF(TRACE_VERBOSE, "StartTransactionCommand"); - } StartTransactionCommand(); pg_exec_query(parser_input); @@ -1638,9 +1640,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) if (!IsEmptyQuery) { if (Verbose) - { TPRINTF(TRACE_VERBOSE, "CommitTransactionCommand"); - } PS_SET_STATUS("commit"); CommitTransactionCommand(); PS_SET_STATUS("idle"); @@ -1661,7 +1661,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) #include "rusagestub.h" #else /* HAVE_GETRUSAGE */ #include <sys/resource.h> -#endif /* HAVE_GETRUSAGE */ +#endif /* HAVE_GETRUSAGE */ struct rusage Save_r; struct timeval Save_t; @@ -1756,7 +1756,7 @@ ShowUsage(void) r.ru_nvcsw - Save_r.ru_nvcsw, r.ru_nivcsw - Save_r.ru_nivcsw, r.ru_nvcsw, r.ru_nivcsw); -#endif /* HAVE_GETRUSAGE */ +#endif /* HAVE_GETRUSAGE */ fprintf(StatFp, "! postgres usage stats:\n"); PrintBufferUsage(StatFp); /* DisplayTupleCount(StatFp); */ @@ -1776,14 +1776,16 @@ assertTest(int val) { Assert(val == 0); - if (assert_enabled) { + if (assert_enabled) + { /* val != 0 should be trapped by previous Assert */ elog(NOTICE, "Assert test successfull (val = %d)", val); - } else { - elog(NOTICE, "Assert checking is disabled (val = %d)", val); } + else + elog(NOTICE, "Assert checking is disabled (val = %d)", val); return val; } + #endif #endif diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 5220ac7700b..2496bdfdc1a 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.17 1998/08/25 21:24:07 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.18 1998/09/01 04:32:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -227,7 +227,7 @@ ProcessQueryDesc(QueryDesc *queryDesc) plan = queryDesc->plantree; operation = queryDesc->operation; - PS_SET_STATUS( tag = CreateOperationTag(operation) ); + PS_SET_STATUS(tag = CreateOperationTag(operation)); dest = queryDesc->dest; /* ---------------- diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index a8203a40e42..afec8896a69 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.48 1998/08/25 21:36:56 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.49 1998/09/01 04:32:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -108,18 +108,18 @@ ProcessUtility(Node *parsetree, switch (stmt->command) { case BEGIN_TRANS: - PS_SET_STATUS( commandTag = "BEGIN" ); + PS_SET_STATUS(commandTag = "BEGIN"); CHECK_IF_ABORTED(); BeginTransactionBlock(); break; case END_TRANS: - PS_SET_STATUS( commandTag = "END" ); + PS_SET_STATUS(commandTag = "END"); EndTransactionBlock(); break; case ABORT_TRANS: - PS_SET_STATUS( commandTag = "ABORT" ); + PS_SET_STATUS(commandTag = "ABORT"); UserAbortTransactionBlock(); break; } @@ -134,7 +134,7 @@ ProcessUtility(Node *parsetree, { ClosePortalStmt *stmt = (ClosePortalStmt *) parsetree; - PS_SET_STATUS( commandTag = "CLOSE" ); + PS_SET_STATUS(commandTag = "CLOSE"); CHECK_IF_ABORTED(); PerformPortalClose(stmt->portalname, dest); @@ -148,7 +148,7 @@ ProcessUtility(Node *parsetree, bool forward; int count; - PS_SET_STATUS( commandTag = (stmt->ismove) ? "MOVE" : "FETCH" ); + PS_SET_STATUS(commandTag = (stmt->ismove) ? "MOVE" : "FETCH"); CHECK_IF_ABORTED(); forward = (bool) (stmt->direction == FORWARD); @@ -169,7 +169,7 @@ ProcessUtility(Node *parsetree, * */ case T_CreateStmt: - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); DefineRelation((CreateStmt *) parsetree, RELKIND_RELATION); @@ -182,7 +182,7 @@ ProcessUtility(Node *parsetree, List *args = stmt->relNames; Relation rel; - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); foreach(arg, args) @@ -222,7 +222,7 @@ ProcessUtility(Node *parsetree, { CopyStmt *stmt = (CopyStmt *) parsetree; - PS_SET_STATUS( commandTag = "COPY" ); + PS_SET_STATUS(commandTag = "COPY"); CHECK_IF_ABORTED(); DoCopy(stmt->relname, @@ -244,7 +244,7 @@ ProcessUtility(Node *parsetree, { AddAttrStmt *stmt = (AddAttrStmt *) parsetree; - PS_SET_STATUS( commandTag = "ADD" ); + PS_SET_STATUS(commandTag = "ADD"); CHECK_IF_ABORTED(); /* @@ -265,7 +265,7 @@ ProcessUtility(Node *parsetree, { RenameStmt *stmt = (RenameStmt *) parsetree; - PS_SET_STATUS( commandTag = "RENAME" ); + PS_SET_STATUS(commandTag = "RENAME"); CHECK_IF_ABORTED(); relname = stmt->relname; @@ -323,7 +323,7 @@ ProcessUtility(Node *parsetree, AclItem *aip; unsigned modechg; - PS_SET_STATUS( commandTag = "CHANGE" ); + PS_SET_STATUS(commandTag = "CHANGE"); CHECK_IF_ABORTED(); aip = stmt->aclitem; @@ -356,7 +356,7 @@ ProcessUtility(Node *parsetree, { DefineStmt *stmt = (DefineStmt *) parsetree; - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); switch (stmt->defType) @@ -366,7 +366,7 @@ ProcessUtility(Node *parsetree, stmt->definition); /* rest */ break; case TYPE_P: - DefineType(stmt->defname, stmt->definition); + DefineType(stmt->defname, stmt->definition); break; case AGGREGATE: DefineAggregate(stmt->defname, /* aggregate name */ @@ -380,14 +380,14 @@ ProcessUtility(Node *parsetree, { ViewStmt *stmt = (ViewStmt *) parsetree; - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); DefineView(stmt->viewname, stmt->query); /* retrieve parsetree */ } break; case T_ProcedureStmt: /* CREATE FUNCTION */ - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); CreateFunction((ProcedureStmt *) parsetree, dest); /* everything */ break; @@ -396,7 +396,7 @@ ProcessUtility(Node *parsetree, { IndexStmt *stmt = (IndexStmt *) parsetree; - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); DefineIndex(stmt->relname, /* relation name */ stmt->idxname, /* index name */ @@ -420,14 +420,14 @@ ProcessUtility(Node *parsetree, if (aclcheck_result != ACLCHECK_OK) elog(ERROR, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]); #endif - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); DefineQueryRewrite(stmt); } break; case T_CreateSeqStmt: - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); DefineSequence((CreateSeqStmt *) parsetree); @@ -437,7 +437,7 @@ ProcessUtility(Node *parsetree, { ExtendStmt *stmt = (ExtendStmt *) parsetree; - PS_SET_STATUS( commandTag = "EXTEND" ); + PS_SET_STATUS(commandTag = "EXTEND"); CHECK_IF_ABORTED(); ExtendIndex(stmt->idxname, /* index name */ @@ -450,7 +450,7 @@ ProcessUtility(Node *parsetree, { RemoveStmt *stmt = (RemoveStmt *) parsetree; - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); switch (stmt->removeType) @@ -512,7 +512,7 @@ ProcessUtility(Node *parsetree, { RemoveAggrStmt *stmt = (RemoveAggrStmt *) parsetree; - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); RemoveAggregate(stmt->aggname, stmt->aggtype); } @@ -522,7 +522,7 @@ ProcessUtility(Node *parsetree, { RemoveFuncStmt *stmt = (RemoveFuncStmt *) parsetree; - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); RemoveFunction(stmt->funcname, length(stmt->args), @@ -536,7 +536,7 @@ ProcessUtility(Node *parsetree, char *type1 = (char *) NULL; char *type2 = (char *) NULL; - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); if (lfirst(stmt->args) != NULL) @@ -548,14 +548,14 @@ ProcessUtility(Node *parsetree, break; case T_VersionStmt: - elog(ERROR, "CREATE VERSION is not currently implemented"); + elog(ERROR, "CREATE VERSION is not currently implemented"); break; case T_CreatedbStmt: { CreatedbStmt *stmt = (CreatedbStmt *) parsetree; - PS_SET_STATUS( commandTag = "CREATEDB" ); + PS_SET_STATUS(commandTag = "CREATEDB"); CHECK_IF_ABORTED(); createdb(stmt->dbname, stmt->dbpath, stmt->encoding); } @@ -565,7 +565,7 @@ ProcessUtility(Node *parsetree, { DestroydbStmt *stmt = (DestroydbStmt *) parsetree; - PS_SET_STATUS( commandTag = "DESTROYDB" ); + PS_SET_STATUS(commandTag = "DESTROYDB"); CHECK_IF_ABORTED(); destroydb(stmt->dbname); } @@ -576,7 +576,7 @@ ProcessUtility(Node *parsetree, { NotifyStmt *stmt = (NotifyStmt *) parsetree; - PS_SET_STATUS( commandTag = "NOTIFY" ); + PS_SET_STATUS(commandTag = "NOTIFY"); CHECK_IF_ABORTED(); Async_Notify(stmt->relname); @@ -587,7 +587,7 @@ ProcessUtility(Node *parsetree, { ListenStmt *stmt = (ListenStmt *) parsetree; - PS_SET_STATUS( commandTag = "LISTEN" ); + PS_SET_STATUS(commandTag = "LISTEN"); CHECK_IF_ABORTED(); Async_Listen(stmt->relname, MyProcPid); @@ -598,7 +598,7 @@ ProcessUtility(Node *parsetree, { UnlistenStmt *stmt = (UnlistenStmt *) parsetree; - PS_SET_STATUS( commandTag = "UNLISTEN" ); + PS_SET_STATUS(commandTag = "UNLISTEN"); CHECK_IF_ABORTED(); Async_Unlisten(stmt->relname, MyProcPid); @@ -615,7 +615,7 @@ ProcessUtility(Node *parsetree, FILE *fp; char *filename; - PS_SET_STATUS( commandTag = "LOAD" ); + PS_SET_STATUS(commandTag = "LOAD"); CHECK_IF_ABORTED(); filename = stmt->filename; @@ -631,7 +631,7 @@ ProcessUtility(Node *parsetree, { ClusterStmt *stmt = (ClusterStmt *) parsetree; - PS_SET_STATUS( commandTag = "CLUSTER" ); + PS_SET_STATUS(commandTag = "CLUSTER"); CHECK_IF_ABORTED(); cluster(stmt->relname, stmt->indexname); @@ -639,7 +639,7 @@ ProcessUtility(Node *parsetree, break; case T_VacuumStmt: - PS_SET_STATUS( commandTag = "VACUUM" ); + PS_SET_STATUS(commandTag = "VACUUM"); CHECK_IF_ABORTED(); vacuum(((VacuumStmt *) parsetree)->vacrel, ((VacuumStmt *) parsetree)->verbose, @@ -651,7 +651,7 @@ ProcessUtility(Node *parsetree, { ExplainStmt *stmt = (ExplainStmt *) parsetree; - PS_SET_STATUS( commandTag = "EXPLAIN" ); + PS_SET_STATUS(commandTag = "EXPLAIN"); CHECK_IF_ABORTED(); ExplainQuery(stmt->query, stmt->verbose, dest); @@ -665,7 +665,7 @@ ProcessUtility(Node *parsetree, { RecipeStmt *stmt = (RecipeStmt *) parsetree; - PS_SET_STATUS( commandTag = "EXECUTE RECIPE" ); + PS_SET_STATUS(commandTag = "EXECUTE RECIPE"); CHECK_IF_ABORTED(); beginRecipe(stmt); } @@ -679,7 +679,7 @@ ProcessUtility(Node *parsetree, VariableSetStmt *n = (VariableSetStmt *) parsetree; SetPGVariable(n->name, n->value); - PS_SET_STATUS( commandTag = "SET VARIABLE" ); + PS_SET_STATUS(commandTag = "SET VARIABLE"); } break; @@ -688,7 +688,7 @@ ProcessUtility(Node *parsetree, VariableShowStmt *n = (VariableShowStmt *) parsetree; GetPGVariable(n->name); - PS_SET_STATUS( commandTag = "SHOW VARIABLE" ); + PS_SET_STATUS(commandTag = "SHOW VARIABLE"); } break; @@ -697,7 +697,7 @@ ProcessUtility(Node *parsetree, VariableResetStmt *n = (VariableResetStmt *) parsetree; ResetPGVariable(n->name); - PS_SET_STATUS( commandTag = "RESET VARIABLE" ); + PS_SET_STATUS(commandTag = "RESET VARIABLE"); } break; @@ -705,14 +705,14 @@ ProcessUtility(Node *parsetree, * ******************************** TRIGGER statements ******************************* */ case T_CreateTrigStmt: - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); CreateTrigger((CreateTrigStmt *) parsetree); break; case T_DropTrigStmt: - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); DropTrigger((DropTrigStmt *) parsetree); @@ -722,14 +722,14 @@ ProcessUtility(Node *parsetree, * ************* PROCEDURAL LANGUAGE statements ***************** */ case T_CreatePLangStmt: - PS_SET_STATUS( commandTag = "CREATE" ); + PS_SET_STATUS(commandTag = "CREATE"); CHECK_IF_ABORTED(); CreateProceduralLanguage((CreatePLangStmt *) parsetree); break; case T_DropPLangStmt: - PS_SET_STATUS( commandTag = "DROP" ); + PS_SET_STATUS(commandTag = "DROP"); CHECK_IF_ABORTED(); DropProceduralLanguage((DropPLangStmt *) parsetree); @@ -740,21 +740,21 @@ ProcessUtility(Node *parsetree, * */ case T_CreateUserStmt: - PS_SET_STATUS( commandTag = "CREATE USER" ); + PS_SET_STATUS(commandTag = "CREATE USER"); CHECK_IF_ABORTED(); DefineUser((CreateUserStmt *) parsetree); break; case T_AlterUserStmt: - PS_SET_STATUS( commandTag = "ALTER USER" ); + PS_SET_STATUS(commandTag = "ALTER USER"); CHECK_IF_ABORTED(); AlterUser((AlterUserStmt *) parsetree); break; case T_DropUserStmt: - PS_SET_STATUS( commandTag = "DROP USER" ); + PS_SET_STATUS(commandTag = "DROP USER"); CHECK_IF_ABORTED(); RemoveUser(((DropUserStmt *) parsetree)->user); |
