mirror of
https://github.com/postgres/postgres.git
synced 2025-06-04 00:02:37 -04:00
From: Massimo Dal Zotto <dz@cs.unitn.it>
> ps-status.patch > > macros for ps status, used by postgres.c and utility.c. > Unfortunately ps status is system dependent and the current > code doesn't work on linux. The use of macros confines system > dependency to into one file (ps-status.h). Users of other > operating systems should check this code and submit new macros.
This commit is contained in:
parent
ab00a220ab
commit
88b17d9c56
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.16 1998/06/04 17:26:47 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.17 1998/08/25 21:24:07 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -35,14 +35,13 @@
|
|||||||
#include "executor/execdesc.h"
|
#include "executor/execdesc.h"
|
||||||
#include "executor/executor.h"
|
#include "executor/executor.h"
|
||||||
#include "tcop/pquery.h"
|
#include "tcop/pquery.h"
|
||||||
|
#include "utils/ps_status.h"
|
||||||
|
|
||||||
#include "commands/command.h"
|
#include "commands/command.h"
|
||||||
|
|
||||||
static char *CreateOperationTag(int operationType);
|
static char *CreateOperationTag(int operationType);
|
||||||
static void ProcessQueryDesc(QueryDesc *queryDesc);
|
static void ProcessQueryDesc(QueryDesc *queryDesc);
|
||||||
|
|
||||||
extern const char **ps_status; /* from postgres.c */
|
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* CreateQueryDesc
|
* CreateQueryDesc
|
||||||
@ -228,7 +227,7 @@ ProcessQueryDesc(QueryDesc *queryDesc)
|
|||||||
plan = queryDesc->plantree;
|
plan = queryDesc->plantree;
|
||||||
|
|
||||||
operation = queryDesc->operation;
|
operation = queryDesc->operation;
|
||||||
*ps_status = tag = CreateOperationTag(operation);
|
PS_SET_STATUS( tag = CreateOperationTag(operation) );
|
||||||
dest = queryDesc->dest;
|
dest = queryDesc->dest;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.46 1998/08/24 01:13:50 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.47 1998/08/25 21:24:09 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -49,6 +49,7 @@
|
|||||||
#include "tcop/utility.h"
|
#include "tcop/utility.h"
|
||||||
#include "fmgr.h" /* For load_file() */
|
#include "fmgr.h" /* For load_file() */
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
|
#include "utils/ps_status.h"
|
||||||
|
|
||||||
#ifndef NO_SECURITY
|
#ifndef NO_SECURITY
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
@ -60,8 +61,6 @@ void DefineUser(CreateUserStmt *stmt);
|
|||||||
void AlterUser(AlterUserStmt *stmt);
|
void AlterUser(AlterUserStmt *stmt);
|
||||||
void RemoveUser(char *username);
|
void RemoveUser(char *username);
|
||||||
|
|
||||||
extern const char **ps_status; /* from postgres.c */
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* CHECK_IF_ABORTED() is used to avoid doing unnecessary
|
* CHECK_IF_ABORTED() is used to avoid doing unnecessary
|
||||||
* processing within an aborted transaction block.
|
* processing within an aborted transaction block.
|
||||||
@ -109,18 +108,18 @@ ProcessUtility(Node *parsetree,
|
|||||||
switch (stmt->command)
|
switch (stmt->command)
|
||||||
{
|
{
|
||||||
case BEGIN_TRANS:
|
case BEGIN_TRANS:
|
||||||
*ps_status = commandTag = "BEGIN";
|
PS_SET_STATUS( commandTag = "BEGIN" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
BeginTransactionBlock();
|
BeginTransactionBlock();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case END_TRANS:
|
case END_TRANS:
|
||||||
*ps_status = commandTag = "END";
|
PS_SET_STATUS( commandTag = "END" );
|
||||||
EndTransactionBlock();
|
EndTransactionBlock();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ABORT_TRANS:
|
case ABORT_TRANS:
|
||||||
*ps_status = commandTag = "ABORT";
|
PS_SET_STATUS( commandTag = "ABORT" );
|
||||||
UserAbortTransactionBlock();
|
UserAbortTransactionBlock();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -135,7 +134,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
ClosePortalStmt *stmt = (ClosePortalStmt *) parsetree;
|
ClosePortalStmt *stmt = (ClosePortalStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "CLOSE";
|
PS_SET_STATUS( commandTag = "CLOSE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
PerformPortalClose(stmt->portalname, dest);
|
PerformPortalClose(stmt->portalname, dest);
|
||||||
@ -149,7 +148,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
bool forward;
|
bool forward;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
*ps_status = commandTag = (stmt->ismove) ? "MOVE" : "FETCH";
|
PS_SET_STATUS( commandTag = (stmt->ismove) ? "MOVE" : "FETCH" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
forward = (bool) (stmt->direction == FORWARD);
|
forward = (bool) (stmt->direction == FORWARD);
|
||||||
@ -170,7 +169,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
case T_CreateStmt:
|
case T_CreateStmt:
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
DefineRelation((CreateStmt *) parsetree, RELKIND_RELATION);
|
DefineRelation((CreateStmt *) parsetree, RELKIND_RELATION);
|
||||||
@ -183,7 +182,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
List *args = stmt->relNames;
|
List *args = stmt->relNames;
|
||||||
Relation rel;
|
Relation rel;
|
||||||
|
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
foreach(arg, args)
|
foreach(arg, args)
|
||||||
@ -223,7 +222,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
CopyStmt *stmt = (CopyStmt *) parsetree;
|
CopyStmt *stmt = (CopyStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "COPY";
|
PS_SET_STATUS( commandTag = "COPY" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
DoCopy(stmt->relname,
|
DoCopy(stmt->relname,
|
||||||
@ -245,7 +244,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
AddAttrStmt *stmt = (AddAttrStmt *) parsetree;
|
AddAttrStmt *stmt = (AddAttrStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "ADD";
|
PS_SET_STATUS( commandTag = "ADD" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -266,7 +265,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
RenameStmt *stmt = (RenameStmt *) parsetree;
|
RenameStmt *stmt = (RenameStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "RENAME";
|
PS_SET_STATUS( commandTag = "RENAME" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
relname = stmt->relname;
|
relname = stmt->relname;
|
||||||
@ -324,7 +323,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
AclItem *aip;
|
AclItem *aip;
|
||||||
unsigned modechg;
|
unsigned modechg;
|
||||||
|
|
||||||
*ps_status = commandTag = "CHANGE";
|
PS_SET_STATUS( commandTag = "CHANGE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
aip = stmt->aclitem;
|
aip = stmt->aclitem;
|
||||||
@ -357,7 +356,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
DefineStmt *stmt = (DefineStmt *) parsetree;
|
DefineStmt *stmt = (DefineStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
switch (stmt->defType)
|
switch (stmt->defType)
|
||||||
@ -381,14 +380,14 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
ViewStmt *stmt = (ViewStmt *) parsetree;
|
ViewStmt *stmt = (ViewStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
DefineView(stmt->viewname, stmt->query); /* retrieve parsetree */
|
DefineView(stmt->viewname, stmt->query); /* retrieve parsetree */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_ProcedureStmt: /* CREATE FUNCTION */
|
case T_ProcedureStmt: /* CREATE FUNCTION */
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
CreateFunction((ProcedureStmt *) parsetree, dest); /* everything */
|
CreateFunction((ProcedureStmt *) parsetree, dest); /* everything */
|
||||||
break;
|
break;
|
||||||
@ -397,7 +396,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
IndexStmt *stmt = (IndexStmt *) parsetree;
|
IndexStmt *stmt = (IndexStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
DefineIndex(stmt->relname, /* relation name */
|
DefineIndex(stmt->relname, /* relation name */
|
||||||
stmt->idxname, /* index name */
|
stmt->idxname, /* index name */
|
||||||
@ -421,14 +420,14 @@ ProcessUtility(Node *parsetree,
|
|||||||
if (aclcheck_result != ACLCHECK_OK)
|
if (aclcheck_result != ACLCHECK_OK)
|
||||||
elog(ERROR, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]);
|
elog(ERROR, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]);
|
||||||
#endif
|
#endif
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
DefineQueryRewrite(stmt);
|
DefineQueryRewrite(stmt);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_CreateSeqStmt:
|
case T_CreateSeqStmt:
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
DefineSequence((CreateSeqStmt *) parsetree);
|
DefineSequence((CreateSeqStmt *) parsetree);
|
||||||
@ -438,7 +437,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
ExtendStmt *stmt = (ExtendStmt *) parsetree;
|
ExtendStmt *stmt = (ExtendStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "EXTEND";
|
PS_SET_STATUS( commandTag = "EXTEND" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
ExtendIndex(stmt->idxname, /* index name */
|
ExtendIndex(stmt->idxname, /* index name */
|
||||||
@ -451,7 +450,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
RemoveStmt *stmt = (RemoveStmt *) parsetree;
|
RemoveStmt *stmt = (RemoveStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
switch (stmt->removeType)
|
switch (stmt->removeType)
|
||||||
@ -513,7 +512,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
RemoveAggrStmt *stmt = (RemoveAggrStmt *) parsetree;
|
RemoveAggrStmt *stmt = (RemoveAggrStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
RemoveAggregate(stmt->aggname, stmt->aggtype);
|
RemoveAggregate(stmt->aggname, stmt->aggtype);
|
||||||
}
|
}
|
||||||
@ -523,7 +522,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
RemoveFuncStmt *stmt = (RemoveFuncStmt *) parsetree;
|
RemoveFuncStmt *stmt = (RemoveFuncStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
RemoveFunction(stmt->funcname,
|
RemoveFunction(stmt->funcname,
|
||||||
length(stmt->args),
|
length(stmt->args),
|
||||||
@ -537,7 +536,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
char *type1 = (char *) NULL;
|
char *type1 = (char *) NULL;
|
||||||
char *type2 = (char *) NULL;
|
char *type2 = (char *) NULL;
|
||||||
|
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
if (lfirst(stmt->args) != NULL)
|
if (lfirst(stmt->args) != NULL)
|
||||||
@ -556,7 +555,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
CreatedbStmt *stmt = (CreatedbStmt *) parsetree;
|
CreatedbStmt *stmt = (CreatedbStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "CREATEDB";
|
PS_SET_STATUS( commandTag = "CREATEDB" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
createdb(stmt->dbname, stmt->dbpath, stmt->encoding);
|
createdb(stmt->dbname, stmt->dbpath, stmt->encoding);
|
||||||
}
|
}
|
||||||
@ -566,7 +565,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
DestroydbStmt *stmt = (DestroydbStmt *) parsetree;
|
DestroydbStmt *stmt = (DestroydbStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "DESTROYDB";
|
PS_SET_STATUS( commandTag = "DESTROYDB" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
destroydb(stmt->dbname);
|
destroydb(stmt->dbname);
|
||||||
}
|
}
|
||||||
@ -577,7 +576,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
NotifyStmt *stmt = (NotifyStmt *) parsetree;
|
NotifyStmt *stmt = (NotifyStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "NOTIFY";
|
PS_SET_STATUS( commandTag = "NOTIFY" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
Async_Notify(stmt->relname);
|
Async_Notify(stmt->relname);
|
||||||
@ -588,7 +587,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
ListenStmt *stmt = (ListenStmt *) parsetree;
|
ListenStmt *stmt = (ListenStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "LISTEN";
|
PS_SET_STATUS( commandTag = "LISTEN" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
Async_Listen(stmt->relname, MyProcPid);
|
Async_Listen(stmt->relname, MyProcPid);
|
||||||
@ -605,7 +604,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
*ps_status = commandTag = "LOAD";
|
PS_SET_STATUS( commandTag = "LOAD" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
filename = stmt->filename;
|
filename = stmt->filename;
|
||||||
@ -621,7 +620,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
ClusterStmt *stmt = (ClusterStmt *) parsetree;
|
ClusterStmt *stmt = (ClusterStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "CLUSTER";
|
PS_SET_STATUS( commandTag = "CLUSTER" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
cluster(stmt->relname, stmt->indexname);
|
cluster(stmt->relname, stmt->indexname);
|
||||||
@ -629,7 +628,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case T_VacuumStmt:
|
case T_VacuumStmt:
|
||||||
*ps_status = commandTag = "VACUUM";
|
PS_SET_STATUS( commandTag = "VACUUM" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
vacuum(((VacuumStmt *) parsetree)->vacrel,
|
vacuum(((VacuumStmt *) parsetree)->vacrel,
|
||||||
((VacuumStmt *) parsetree)->verbose,
|
((VacuumStmt *) parsetree)->verbose,
|
||||||
@ -641,7 +640,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
ExplainStmt *stmt = (ExplainStmt *) parsetree;
|
ExplainStmt *stmt = (ExplainStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "EXPLAIN";
|
PS_SET_STATUS( commandTag = "EXPLAIN" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
ExplainQuery(stmt->query, stmt->verbose, dest);
|
ExplainQuery(stmt->query, stmt->verbose, dest);
|
||||||
@ -655,7 +654,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
{
|
{
|
||||||
RecipeStmt *stmt = (RecipeStmt *) parsetree;
|
RecipeStmt *stmt = (RecipeStmt *) parsetree;
|
||||||
|
|
||||||
*ps_status = commandTag = "EXECUTE RECIPE";
|
PS_SET_STATUS( commandTag = "EXECUTE RECIPE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
beginRecipe(stmt);
|
beginRecipe(stmt);
|
||||||
}
|
}
|
||||||
@ -669,7 +668,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
VariableSetStmt *n = (VariableSetStmt *) parsetree;
|
VariableSetStmt *n = (VariableSetStmt *) parsetree;
|
||||||
|
|
||||||
SetPGVariable(n->name, n->value);
|
SetPGVariable(n->name, n->value);
|
||||||
*ps_status = commandTag = "SET VARIABLE";
|
PS_SET_STATUS( commandTag = "SET VARIABLE" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -678,7 +677,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
VariableShowStmt *n = (VariableShowStmt *) parsetree;
|
VariableShowStmt *n = (VariableShowStmt *) parsetree;
|
||||||
|
|
||||||
GetPGVariable(n->name);
|
GetPGVariable(n->name);
|
||||||
*ps_status = commandTag = "SHOW VARIABLE";
|
PS_SET_STATUS( commandTag = "SHOW VARIABLE" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -687,7 +686,7 @@ ProcessUtility(Node *parsetree,
|
|||||||
VariableResetStmt *n = (VariableResetStmt *) parsetree;
|
VariableResetStmt *n = (VariableResetStmt *) parsetree;
|
||||||
|
|
||||||
ResetPGVariable(n->name);
|
ResetPGVariable(n->name);
|
||||||
*ps_status = commandTag = "RESET VARIABLE";
|
PS_SET_STATUS( commandTag = "RESET VARIABLE" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -695,14 +694,14 @@ ProcessUtility(Node *parsetree,
|
|||||||
* ******************************** TRIGGER statements *******************************
|
* ******************************** TRIGGER statements *******************************
|
||||||
*/
|
*/
|
||||||
case T_CreateTrigStmt:
|
case T_CreateTrigStmt:
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
CreateTrigger((CreateTrigStmt *) parsetree);
|
CreateTrigger((CreateTrigStmt *) parsetree);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_DropTrigStmt:
|
case T_DropTrigStmt:
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
DropTrigger((DropTrigStmt *) parsetree);
|
DropTrigger((DropTrigStmt *) parsetree);
|
||||||
@ -712,14 +711,14 @@ ProcessUtility(Node *parsetree,
|
|||||||
* ************* PROCEDURAL LANGUAGE statements *****************
|
* ************* PROCEDURAL LANGUAGE statements *****************
|
||||||
*/
|
*/
|
||||||
case T_CreatePLangStmt:
|
case T_CreatePLangStmt:
|
||||||
*ps_status = commandTag = "CREATE";
|
PS_SET_STATUS( commandTag = "CREATE" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
CreateProceduralLanguage((CreatePLangStmt *) parsetree);
|
CreateProceduralLanguage((CreatePLangStmt *) parsetree);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_DropPLangStmt:
|
case T_DropPLangStmt:
|
||||||
*ps_status = commandTag = "DROP";
|
PS_SET_STATUS( commandTag = "DROP" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
DropProceduralLanguage((DropPLangStmt *) parsetree);
|
DropProceduralLanguage((DropPLangStmt *) parsetree);
|
||||||
@ -730,21 +729,21 @@ ProcessUtility(Node *parsetree,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
case T_CreateUserStmt:
|
case T_CreateUserStmt:
|
||||||
*ps_status = commandTag = "CREATE USER";
|
PS_SET_STATUS( commandTag = "CREATE USER" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
DefineUser((CreateUserStmt *) parsetree);
|
DefineUser((CreateUserStmt *) parsetree);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_AlterUserStmt:
|
case T_AlterUserStmt:
|
||||||
*ps_status = commandTag = "ALTER USER";
|
PS_SET_STATUS( commandTag = "ALTER USER" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
AlterUser((AlterUserStmt *) parsetree);
|
AlterUser((AlterUserStmt *) parsetree);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_DropUserStmt:
|
case T_DropUserStmt:
|
||||||
*ps_status = commandTag = "DROP USER";
|
PS_SET_STATUS( commandTag = "DROP USER" );
|
||||||
CHECK_IF_ABORTED();
|
CHECK_IF_ABORTED();
|
||||||
|
|
||||||
RemoveUser(((DropUserStmt *) parsetree)->user);
|
RemoveUser(((DropUserStmt *) parsetree)->user);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.24 1998/07/09 03:28:51 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.25 1998/08/25 21:24:10 scrappy Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Globals used all over the place should be declared here and not
|
* Globals used all over the place should be declared here and not
|
||||||
@ -43,7 +43,7 @@ bool Quiet = false;
|
|||||||
bool QueryCancel = false;
|
bool QueryCancel = false;
|
||||||
|
|
||||||
int MyProcPid;
|
int MyProcPid;
|
||||||
|
struct Port *MyProcPort;
|
||||||
long MyCancelKey;
|
long MyCancelKey;
|
||||||
|
|
||||||
char *DataDir;
|
char *DataDir;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: miscadmin.h,v 1.31 1998/08/24 01:14:07 momjian Exp $
|
* $Id: miscadmin.h,v 1.32 1998/08/25 21:24:12 scrappy Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* some of the information in this file will be moved to
|
* some of the information in this file will be moved to
|
||||||
@ -41,7 +41,7 @@ extern bool QueryCancel;
|
|||||||
extern char *DataDir;
|
extern char *DataDir;
|
||||||
|
|
||||||
extern int MyProcPid;
|
extern int MyProcPid;
|
||||||
|
extern struct Port *MyProcPort;
|
||||||
extern long MyCancelKey;
|
extern long MyCancelKey;
|
||||||
|
|
||||||
extern char OutputFileName[];
|
extern char OutputFileName[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user