1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

pgindent run before 6.3 release, with Thomas' requested changes.

This commit is contained in:
Bruce Momjian
1998-02-26 04:46:47 +00:00
parent 757bf69a2e
commit a32450a585
430 changed files with 12390 additions and 10292 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.16 1998/01/26 01:41:23 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.17 1998/02/26 04:36:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,7 +61,7 @@ void (*
{
switch (dest)
{
case RemoteInternal:
case RemoteInternal:
return printtup_internal;
break;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.12 1998/01/26 01:41:28 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.13 1998/02/26 04:36:26 momjian Exp $
*
* NOTES
* This cruft is the server side of PQfn.
@@ -326,7 +326,9 @@ HandleFunctionRequest()
{ /* by-reference ... */
if (fip->arglen[i] < 0)
{ /* ... varlena */
if (!(p = palloc(argsize + VARHDRSZ + 1))) /* Added +1 to solve memory leak - Peter 98 Jan 6 */
if (!(p = palloc(argsize + VARHDRSZ + 1))) /* Added +1 to solve
* memory leak - Peter
* 98 Jan 6 */
{
elog(ERROR, "HandleFunctionRequest: palloc failed");
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.66 1998/02/24 15:19:23 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.67 1998/02/26 04:36:31 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -371,12 +371,13 @@ ReadCommand(char *inBuf)
return InteractiveBackend(inBuf);
}
List *
pg_parse_and_plan(char *query_string, /* string to execute */
Oid *typev, /* argument types */
int nargs, /* number of arguments */
QueryTreeList **queryListP, /* pointer to the parse trees */
CommandDest dest) /* where results should go */
List *
pg_parse_and_plan(char *query_string, /* string to execute */
Oid *typev, /* argument types */
int nargs, /* number of arguments */
QueryTreeList **queryListP, /* pointer to the parse
* trees */
CommandDest dest) /* where results should go */
{
QueryTreeList *querytree_list;
int i;
@@ -416,8 +417,10 @@ pg_parse_and_plan(char *query_string, /* string to execute */
* rewrites */
for (i = 0; i < querytree_list->len; i++)
{
List *union_result, *union_list, *rewritten_list;
List *union_result,
*union_list,
*rewritten_list;
querytree = querytree_list->qtrees[i];
@@ -446,14 +449,15 @@ pg_parse_and_plan(char *query_string, /* string to execute */
rewritten = QueryRewrite(querytree);
/*
* Rewrite the UNIONS.
* Rewrite the UNIONS.
*/
foreach(rewritten_list, rewritten)
{
Query *qry = (Query *)lfirst(rewritten_list);
Query *qry = (Query *) lfirst(rewritten_list);
union_result = NIL;
foreach(union_list, qry->unionClause)
union_result = nconc(union_result, QueryRewrite((Query *)lfirst(union_list)));
union_result = nconc(union_result, QueryRewrite((Query *) lfirst(union_list)));
qry->unionClause = union_result;
}
@@ -598,11 +602,11 @@ pg_exec_query(char *query_string, char **argv, Oid *typev, int nargs)
}
void
pg_exec_query_dest(char *query_string,/* string to execute */
char **argv, /* arguments */
Oid *typev, /* argument types */
int nargs, /* number of arguments */
CommandDest dest) /* where results should go */
pg_exec_query_dest(char *query_string, /* string to execute */
char **argv, /* arguments */
Oid *typev, /* argument types */
int nargs, /* number of arguments */
CommandDest dest) /* where results should go */
{
List *plan_list;
Plan *plan;
@@ -740,11 +744,11 @@ static void
quickdie(SIGNAL_ARGS)
{
elog(NOTICE, "Message from PostgreSQL backend:"
"\n\tThe Postmaster has informed me that some other backend"
" died abnormally and possibly corrupted shared memory."
"\n\tI have rolled back the current transaction and am"
" going to terminate your database system connection and exit."
"\n\tPlease reconnect to the database system and repeat your query.");
"\n\tThe Postmaster has informed me that some other backend"
" died abnormally and possibly corrupted shared memory."
"\n\tI have rolled back the current transaction and am"
" going to terminate your database system connection and exit."
"\n\tPlease reconnect to the database system and repeat your query.");
/*
@@ -767,8 +771,8 @@ static void
FloatExceptionHandler(SIGNAL_ARGS)
{
elog(ERROR, "floating point exception!"
" The last floating point operation either exceeded legal ranges"
" or was a divide by zero");
" The last floating point operation either exceeded legal ranges"
" or was a divide by zero");
}
@@ -868,14 +872,15 @@ PostgresMain(int argc, char *argv[])
#endif
/*
* get hostname is either the environment variable PGHOST or NULL
* NULL means Unix-socket only
* get hostname is either the environment variable PGHOST or NULL NULL
* means Unix-socket only
*/
DataDir = getenv("PGDATA");
/*
* Try to get initial values for date styles and formats.
* Does not do a complete job, but should be good enough for backend.
* Cannot call parse_date() since palloc/pfree memory is not set up yet.
* Try to get initial values for date styles and formats. Does not do
* a complete job, but should be good enough for backend. Cannot call
* parse_date() since palloc/pfree memory is not set up yet.
*/
DBDate = getenv("PGDATESTYLE");
if (DBDate != NULL)
@@ -1068,10 +1073,10 @@ PostgresMain(int argc, char *argv[])
* ----------------
*/
{
int S;
int S;
S = atoi(optarg);
if ( S >= 4*BLCKSZ/1024 )
if (S >= 4 * BLCKSZ / 1024)
SortMem = S;
}
break;
@@ -1117,7 +1122,7 @@ PostgresMain(int argc, char *argv[])
break;
case 'v':
FrontendProtocol = (ProtocolVersion)atoi(optarg);
FrontendProtocol = (ProtocolVersion) atoi(optarg);
break;
case 'x':
@@ -1169,7 +1174,7 @@ PostgresMain(int argc, char *argv[])
userName = GetPgUserName();
#ifdef CYR_RECODE
SetCharSet();
SetCharSet();
#endif
if (FindBackend(pg_pathname, argv[0]) < 0)
@@ -1297,7 +1302,7 @@ PostgresMain(int argc, char *argv[])
if (IsUnderPostmaster == false)
{
puts("\nPOSTGRES backend interactive interface");
puts("$Revision: 1.66 $ $Date: 1998/02/24 15:19:23 $");
puts("$Revision: 1.67 $ $Date: 1998/02/26 04:36:31 $");
}
/* ----------------

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.14 1998/02/13 03:42:32 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.15 1998/02/26 04:36:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,7 +66,7 @@ CreateQueryDesc(Query *parsetree,
* Note: this may someday take parameters -cim 9/18/89
* ----------------------------------------------------------------
*/
EState *
EState *
CreateExecutorState(void)
{
EState *state;

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.37 1998/01/25 05:14:27 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.38 1998/02/26 04:36:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,9 +56,9 @@
#include "utils/syscache.h"
#endif
void DefineUser(CreateUserStmt *stmt);
void AlterUser(AlterUserStmt *stmt);
void RemoveUser(char *username);
void DefineUser(CreateUserStmt *stmt);
void AlterUser(AlterUserStmt *stmt);
void RemoveUser(char *username);
/* ----------------
* CHECK_IF_ABORTED() is used to avoid doing unnecessary
@@ -78,7 +78,7 @@ void RemoveUser(char *username);
* ----------------
*/
void
ProcessUtility(Node * parsetree,
ProcessUtility(Node *parsetree,
CommandDest dest)
{
char *commandTag = NULL;
@@ -242,12 +242,13 @@ ProcessUtility(Node * parsetree,
CHECK_IF_ABORTED();
/*
* owner checking done in PerformAddAttribute (now recursive)
* owner checking done in PerformAddAttribute (now
* recursive)
*/
PerformAddAttribute(stmt->relname,
userName,
stmt->inh,
(ColumnDef *)stmt->colDef);
(ColumnDef *) stmt->colDef);
}
break;
@@ -723,30 +724,30 @@ ProcessUtility(Node * parsetree,
DropProceduralLanguage((DropPLangStmt *) parsetree);
break;
/*
* ******************************** USER statements ****
*
*/
case T_CreateUserStmt:
commandTag = "CREATE USER";
CHECK_IF_ABORTED();
/*
* ******************************** USER statements ****
*
*/
case T_CreateUserStmt:
commandTag = "CREATE USER";
CHECK_IF_ABORTED();
DefineUser((CreateUserStmt*)parsetree);
break;
DefineUser((CreateUserStmt *) parsetree);
break;
case T_AlterUserStmt:
commandTag = "ALTER USER";
CHECK_IF_ABORTED();
case T_AlterUserStmt:
commandTag = "ALTER USER";
CHECK_IF_ABORTED();
AlterUser((AlterUserStmt*)parsetree);
break;
AlterUser((AlterUserStmt *) parsetree);
break;
case T_DropUserStmt:
commandTag = "DROP USER";
CHECK_IF_ABORTED();
case T_DropUserStmt:
commandTag = "DROP USER";
CHECK_IF_ABORTED();
RemoveUser(((DropUserStmt*)parsetree)->user);
break;
RemoveUser(((DropUserStmt *) parsetree)->user);
break;
/*