summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/transam/transam.c4
-rw-r--r--src/backend/access/transam/varsup.c12
-rw-r--r--src/backend/access/transam/xact.c10
-rw-r--r--src/backend/access/transam/xlog.c6
-rw-r--r--src/backend/bootstrap/bootparse.y6
-rw-r--r--src/backend/bootstrap/bootscanner.l4
-rw-r--r--src/backend/commands/schemacmds.c6
-rw-r--r--src/backend/commands/user.c4
-rw-r--r--src/backend/commands/variable.c4
-rw-r--r--src/backend/parser/gram.y78
-rw-r--r--src/backend/parser/keywords.c14
-rw-r--r--src/backend/postmaster/postmaster.c4
-rw-r--r--src/backend/storage/ipc/sinval.c28
-rw-r--r--src/backend/storage/lmgr/deadlock.c70
-rw-r--r--src/backend/storage/lmgr/lock.c18
-rw-r--r--src/backend/storage/lmgr/lwlock.c22
-rw-r--r--src/backend/storage/lmgr/proc.c70
-rw-r--r--src/backend/utils/adt/date.c6
-rw-r--r--src/backend/utils/adt/datetime.c38
-rw-r--r--src/backend/utils/adt/nabstime.c6
-rw-r--r--src/backend/utils/adt/name.c6
-rw-r--r--src/backend/utils/init/miscinit.c4
-rw-r--r--src/backend/utils/init/postinit.c6
23 files changed, 213 insertions, 213 deletions
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c
index 34a13d3ae67..4e83ca7937f 100644
--- a/src/backend/access/transam/transam.c
+++ b/src/backend/access/transam/transam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.51 2002/05/25 20:00:11 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.52 2002/06/11 13:40:50 wieck Exp $
*
* NOTES
* This file contains the high level access-method interface to the
@@ -201,7 +201,7 @@ TransactionIdDidAbort(TransactionId transactionId)
/*
* Now this func in shmem.c and gives quality answer by scanning
- * PROC structures of all running backend. - vadim 11/26/96
+ * PGPROC structures of all running backend. - vadim 11/26/96
*
* Old comments:
* true if given transaction has neither committed nor aborted
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index 80618e3de12..4b8e76085bb 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -6,7 +6,7 @@
* Copyright (c) 2000, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.49 2002/05/25 20:00:11 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.50 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,23 +61,23 @@ GetNewTransactionId(void)
* Must set MyProc->xid before releasing XidGenLock. This ensures
* that when GetSnapshotData calls ReadNewTransactionId, all active
* XIDs before the returned value of nextXid are already present in
- * the shared PROC array. Else we have a race condition.
+ * the shared PGPROC array. Else we have a race condition.
*
* XXX by storing xid into MyProc without acquiring SInvalLock, we are
* relying on fetch/store of an xid to be atomic, else other backends
* might see a partially-set xid here. But holding both locks at once
* would be a nasty concurrency hit (and in fact could cause a
* deadlock against GetSnapshotData). So for now, assume atomicity.
- * Note that readers of PROC xid field should be careful to fetch the
+ * Note that readers of PGPROC xid field should be careful to fetch the
* value only once, rather than assume they can read it multiple times
* and get the same answer each time.
*
- * A solution to the atomic-store problem would be to give each PROC its
- * own spinlock used only for fetching/storing that PROC's xid.
+ * A solution to the atomic-store problem would be to give each PGPROC its
+ * own spinlock used only for fetching/storing that PGPROC's xid.
* (SInvalLock would then mean primarily that PROCs couldn't be added/
* removed while holding the lock.)
*/
- if (MyProc != (PROC *) NULL)
+ if (MyProc != (PGPROC *) NULL)
MyProc->xid = xid;
LWLockRelease(XidGenLock);
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index f2a3caeabd9..0159295cf56 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.125 2002/05/25 20:00:12 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.126 2002/06/11 13:40:50 wieck Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@@ -602,7 +602,7 @@ RecordTransactionCommit(void)
MyLastRecPtr.xrecoff = 0;
MyXactMadeXLogEntry = false;
- /* Show myself as out of the transaction in PROC array */
+ /* Show myself as out of the transaction in PGPROC array */
MyProc->logRec.xrecoff = 0;
if (leak)
@@ -727,7 +727,7 @@ RecordTransactionAbort(void)
MyLastRecPtr.xrecoff = 0;
MyXactMadeXLogEntry = false;
- /* Show myself as out of the transaction in PROC array */
+ /* Show myself as out of the transaction in PGPROC array */
MyProc->logRec.xrecoff = 0;
/*
@@ -960,7 +960,7 @@ CommitTransaction(void)
* as running as well or it will see two tuple versions - one deleted
* by xid 1 and one inserted by xid 0. See notes in GetSnapshotData.
*/
- if (MyProc != (PROC *) NULL)
+ if (MyProc != (PGPROC *) NULL)
{
/* Lock SInvalLock because that's what GetSnapshotData uses. */
LWLockAcquire(SInvalLock, LW_EXCLUSIVE);
@@ -1069,7 +1069,7 @@ AbortTransaction(void)
* this must be done _before_ releasing locks we hold and _after_
* RecordTransactionAbort.
*/
- if (MyProc != (PROC *) NULL)
+ if (MyProc != (PGPROC *) NULL)
{
/* Lock SInvalLock because that's what GetSnapshotData uses. */
LWLockAcquire(SInvalLock, LW_EXCLUSIVE);
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index c80c73f9e36..7f7701eb55a 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.96 2002/06/07 21:47:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.97 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -753,7 +753,7 @@ begin:;
/* Compute record's XLOG location */
INSERT_RECPTR(RecPtr, Insert, curridx);
- /* If first XLOG record of transaction, save it in PROC array */
+ /* If first XLOG record of transaction, save it in PGPROC array */
if (MyLastRecPtr.xrecoff == 0 && !no_tran)
{
/*
@@ -3026,7 +3026,7 @@ CreateCheckPoint(bool shutdown)
}
/*
- * Get UNDO record ptr - this is oldest of PROC->logRec values. We do
+ * Get UNDO record ptr - this is oldest of PGPROC->logRec values. We do
* this while holding insert lock to ensure that we won't miss any
* about-to-commit transactions (UNDO must include all xacts that have
* commits after REDO point).
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index e6250d0c501..2bd68069c8f 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.46 2002/04/27 21:24:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.47 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -93,7 +93,7 @@ int num_columns_read = 0;
%type <ival> boot_tuple boot_tuplelist
%type <oidval> optoideq
-%token <ival> CONST ID
+%token <ival> CONST_P ID
%token OPEN XCLOSE XCREATE INSERT_TUPLE
%token STRING XDEFINE
%token XDECLARE INDEX ON USING XBUILD INDICES UNIQUE
@@ -329,7 +329,7 @@ boot_tuple:
;
boot_const :
- CONST { $$=yylval.ival; }
+ CONST_P { $$=yylval.ival; }
;
boot_ident :
diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l
index b471dcc66e9..e0656a82a01 100644
--- a/src/backend/bootstrap/bootscanner.l
+++ b/src/backend/bootstrap/bootscanner.l
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.22 2002/04/27 21:24:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.23 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -121,7 +121,7 @@ insert { return(INSERT_TUPLE); }
(-)?{D}*"."{D}+({Exp})? |
(-)?{D}+{Exp} {
yylval.ival = EnterString((char*)yytext);
- return(CONST);
+ return(CONST_P);
}
. {
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index 8f1870473df..a790a28bccd 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.3 2002/05/17 20:53:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.4 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,7 +50,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
if (!authId)
{
owner_userid = saved_userid;
- owner_name = GetUserName(owner_userid);
+ owner_name = GetUserNameFromId(owner_userid);
}
else if (superuser())
{
@@ -68,7 +68,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
else /* not superuser */
{
owner_userid = saved_userid;
- owner_name = GetUserName(owner_userid);
+ owner_name = GetUserNameFromId(owner_userid);
if (strcmp(authId, owner_name) != 0)
elog(ERROR, "CREATE SCHEMA: permission denied"
"\n\t\"%s\" is not a superuser, so cannot create a schema for \"%s\"",
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 98f47dd98bb..eb9a3e624cb 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.103 2002/05/21 22:05:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.104 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -724,7 +724,7 @@ AlterUser(AlterUserStmt *stmt)
createuser < 0 &&
!validUntil &&
password &&
- strcmp(GetUserName(GetUserId()), stmt->user) == 0))
+ strcmp(GetUserNameFromId(GetUserId()), stmt->user) == 0))
elog(ERROR, "ALTER USER: permission denied");
/* changes to the flat password file cannot be rolled back */
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 03d7a664577..9ac829094dd 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.67 2002/05/17 01:19:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.68 2002/06/11 13:40:50 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -583,5 +583,5 @@ assign_session_authorization(const char *value, bool doit, bool interactive)
const char *
show_session_authorization(void)
{
- return GetUserName(GetSessionUserId());
+ return GetUserNameFromId(GetSessionUserId());
}
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index d1109b58a7e..fbf63db85e2 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.319 2002/05/22 17:20:59 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.320 2002/06/11 13:40:50 wieck Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -321,25 +321,25 @@ static void doNegateFloat(Value *v);
BACKWARD, BEFORE, BEGIN_TRANS, BETWEEN, BIGINT, BINARY, BIT, BOTH,
BOOLEAN, BY,
- CACHE, CALLED, CASCADE, CASE, CAST, CHAIN, CHAR, CHARACTER,
+ CACHE, CALLED, CASCADE, CASE, CAST, CHAIN, CHAR_P, CHARACTER,
CHARACTERISTICS, CHECK, CHECKPOINT, CLOSE, CLUSTER, COALESCE, COLLATE,
COLUMN, COMMENT, COMMIT, COMMITTED, CONSTRAINT, CONSTRAINTS, COPY,
CREATE, CREATEDB, CREATEUSER, CROSS, CURRENT_DATE, CURRENT_TIME,
CURRENT_TIMESTAMP, CURRENT_USER, CURSOR, CYCLE,
DATABASE, DAY_P, DEC, DECIMAL, DECLARE, DEFAULT, DEFERRABLE, DEFERRED,
- DEFINER, DELETE, DELIMITERS, DESC, DISTINCT, DO, DOMAIN_P, DOUBLE, DROP,
+ DEFINER, DELETE_P, DELIMITERS, DESC, DISTINCT, DO, DOMAIN_P, DOUBLE, DROP,
EACH, ELSE, ENCODING, ENCRYPTED, END_TRANS, ESCAPE, EXCEPT, EXCLUSIVE,
EXECUTE, EXISTS, EXPLAIN, EXTERNAL, EXTRACT,
- FALSE_P, FETCH, FLOAT, FOR, FORCE, FOREIGN, FORWARD, FREEZE, FROM,
+ FALSE_P, FETCH, FLOAT_P, FOR, FORCE, FOREIGN, FORWARD, FREEZE, FROM,
FULL, FUNCTION,
- GLOBAL, GRANT, GROUP,
+ GLOBAL, GRANT, GROUP_P,
HANDLER, HAVING, HOUR_P,
- ILIKE, IMMEDIATE, IMMUTABLE, IMPLICIT, IN, INCREMENT, INDEX, INHERITS,
+ ILIKE, IMMEDIATE, IMMUTABLE, IMPLICIT, IN_P, INCREMENT, INDEX, INHERITS,
INITIALLY, INNER_P, INOUT, INPUT, INSENSITIVE, INSERT, INSTEAD, INT,
INTEGER, INTERSECT, INTERVAL, INTO, INVOKER, IS, ISNULL, ISOLATION,
@@ -356,7 +356,7 @@ static void doNegateFloat(Value *v);
NUMERIC,
OF, OFF, OFFSET, OIDS, OLD, ON, ONLY, OPERATOR, OPTION, OR, ORDER,
- OUT, OUTER_P, OVERLAPS, OWNER,
+ OUT_P, OUTER_P, OVERLAPS, OWNER,
PARTIAL, PASSWORD, PATH_P, PENDANT, POSITION, PRECISION, PRIMARY,
PRIOR, PRIVILEGES, PROCEDURE, PROCEDURAL,
@@ -406,7 +406,7 @@ static void doNegateFloat(Value *v);
%nonassoc ESCAPE
%nonassoc OVERLAPS
%nonassoc BETWEEN
-%nonassoc IN
+%nonassoc IN_P
%left POSTFIXOP /* dummy for postfix Op rules */
%left Op OPERATOR /* multi-character ops and user-defined operators */
%nonassoc NOTNULL
@@ -647,7 +647,7 @@ OptUserElem: PASSWORD Sconst
$$->defname = "createuser";
$$->arg = (Node *)makeInteger(FALSE);
}
- | IN GROUP user_list
+ | IN_P GROUP_P user_list
{
$$ = makeNode(DefElem);
$$->defname = "groupElts";
@@ -680,14 +680,14 @@ user_list: user_list ',' UserId
*
*****************************************************************************/
-CreateGroupStmt: CREATE GROUP UserId OptGroupList
+CreateGroupStmt: CREATE GROUP_P UserId OptGroupList
{
CreateGroupStmt *n = makeNode(CreateGroupStmt);
n->name = $3;
n->options = $4;
$$ = (Node *)n;
}
- | CREATE GROUP UserId WITH OptGroupList
+ | CREATE GROUP_P UserId WITH OptGroupList
{
CreateGroupStmt *n = makeNode(CreateGroupStmt);
n->name = $3;
@@ -725,7 +725,7 @@ OptGroupElem: USER user_list
*
*****************************************************************************/
-AlterGroupStmt: ALTER GROUP UserId ADD USER user_list
+AlterGroupStmt: ALTER GROUP_P UserId ADD USER user_list
{
AlterGroupStmt *n = makeNode(AlterGroupStmt);
n->name = $3;
@@ -733,7 +733,7 @@ AlterGroupStmt: ALTER GROUP UserId ADD USER user_list
n->listUsers = $6;
$$ = (Node *)n;
}
- | ALTER GROUP UserId DROP USER user_list
+ | ALTER GROUP_P UserId DROP USER user_list
{
AlterGroupStmt *n = makeNode(AlterGroupStmt);
n->name = $3;
@@ -751,7 +751,7 @@ AlterGroupStmt: ALTER GROUP UserId ADD USER user_list
*
*****************************************************************************/
-DropGroupStmt: DROP GROUP UserId
+DropGroupStmt: DROP GROUP_P UserId
{
DropGroupStmt *n = makeNode(DropGroupStmt);
n->name = $3;
@@ -1671,7 +1671,7 @@ key_actions: key_delete { $$ = $1; }
| /*EMPTY*/ { $$ = 0; }
;
-key_delete: ON DELETE key_reference { $$ = $3 << FKCONSTR_ON_DELETE_SHIFT; }
+key_delete: ON DELETE_P key_reference { $$ = $3 << FKCONSTR_ON_DELETE_SHIFT; }
;
key_update: ON UPDATE key_reference { $$ = $3 << FKCONSTR_ON_UPDATE_SHIFT; }
@@ -1963,7 +1963,7 @@ TriggerEvents: TriggerOneEvent
;
TriggerOneEvent: INSERT { $$ = 'i'; }
- | DELETE { $$ = 'd'; }
+ | DELETE_P { $$ = 'd'; }
| UPDATE { $$ = 'u'; }
;
@@ -2472,7 +2472,7 @@ fetch_how_many: Iconst { $$ = $1; }
| PRIOR { $$ = -1; }
;
-from_in: IN { }
+from_in: IN_P { }
| FROM { }
;
@@ -2524,7 +2524,7 @@ privilege_list: privilege { $$ = makeListi1($1); }
privilege: SELECT { $$ = ACL_SELECT; }
| INSERT { $$ = ACL_INSERT; }
| UPDATE { $$ = ACL_UPDATE; }
- | DELETE { $$ = ACL_DELETE; }
+ | DELETE_P { $$ = ACL_DELETE; }
| RULE { $$ = ACL_RULE; }
| REFERENCES { $$ = ACL_REFERENCES; }
| TRIGGER { $$ = ACL_TRIGGER; }
@@ -2598,7 +2598,7 @@ grantee: ColId
n->groupname = NULL;
$$ = (Node *)n;
}
- | GROUP ColId
+ | GROUP_P ColId
{
PrivGrantee *n = makeNode(PrivGrantee);
/* Treat GROUP PUBLIC as a synonym for PUBLIC */
@@ -2807,11 +2807,11 @@ func_arg: opt_arg func_type
}
;
-opt_arg: IN
+opt_arg: IN_P
{
$$ = FALSE;
}
- | OUT
+ | OUT_P
{
elog(ERROR, "CREATE FUNCTION / OUT parameters are not supported");
$$ = TRUE;
@@ -3143,7 +3143,7 @@ RuleActionStmtOrEmpty: RuleActionStmt
/* change me to select, update, etc. some day */
event: SELECT { $$ = CMD_SELECT; }
| UPDATE { $$ = CMD_UPDATE; }
- | DELETE { $$ = CMD_DELETE; }
+ | DELETE_P { $$ = CMD_DELETE; }
| INSERT { $$ = CMD_INSERT; }
;
@@ -3728,7 +3728,7 @@ insert_column_item: ColId opt_indirection
*
*****************************************************************************/
-DeleteStmt: DELETE FROM relation_expr where_clause
+DeleteStmt: DELETE_P FROM relation_expr where_clause
{
DeleteStmt *n = makeNode(DeleteStmt);
n->relation = $3;
@@ -3747,7 +3747,7 @@ LockStmt: LOCK_P opt_table qualified_name_list opt_lock
}
;
-opt_lock: IN lock_type MODE { $$ = $2; }
+opt_lock: IN_P lock_type MODE { $$ = $2; }
| /*EMPTY*/ { $$ = AccessExclusiveLock; }
;
@@ -4134,7 +4134,7 @@ select_offset_value: Iconst
* cases for these.
*/
-group_clause: GROUP BY expr_list { $$ = $3; }
+group_clause: GROUP_P BY expr_list { $$ = $3; }
| /*EMPTY*/ { $$ = NIL; }
;
@@ -4535,7 +4535,7 @@ Numeric: INT
{
$$ = SystemTypeName("float4");
}
- | FLOAT opt_float
+ | FLOAT_P opt_float
{
$$ = $2;
}
@@ -4726,10 +4726,10 @@ Character: character '(' Iconst ')' opt_charset
;
character: CHARACTER opt_varying { $$ = $2 ? "varchar": "bpchar"; }
- | CHAR opt_varying { $$ = $2 ? "varchar": "bpchar"; }
+ | CHAR_P opt_varying { $$ = $2 ? "varchar": "bpchar"; }
| VARCHAR { $$ = "varchar"; }
| NATIONAL CHARACTER opt_varying { $$ = $3 ? "varchar": "bpchar"; }
- | NATIONAL CHAR opt_varying { $$ = $3 ? "varchar": "bpchar"; }
+ | NATIONAL CHAR_P opt_varying { $$ = $3 ? "varchar": "bpchar"; }
| NCHAR opt_varying { $$ = $2 ? "varchar": "bpchar"; }
;
@@ -4842,7 +4842,7 @@ opt_interval: YEAR_P { $$ = MASK(YEAR); }
* Define row_descriptor to allow yacc to break the reduce/reduce conflict
* with singleton expressions.
*/
-row_expr: '(' row_descriptor ')' IN select_with_parens
+row_expr: '(' row_descriptor ')' IN_P select_with_parens
{
SubLink *n = makeNode(SubLink);
n->lefthand = $2;
@@ -4852,7 +4852,7 @@ row_expr: '(' row_descriptor ')' IN select_with_parens
n->subselect = $5;
$$ = (Node *)n;
}
- | '(' row_descriptor ')' NOT IN select_with_parens
+ | '(' row_descriptor ')' NOT IN_P select_with_parens
{
SubLink *n = makeNode(SubLink);
n->lefthand = $2;
@@ -5190,7 +5190,7 @@ a_expr: c_expr
(Node *) makeSimpleA_Expr(OP, "<", $1, $4),
(Node *) makeSimpleA_Expr(OP, ">", $1, $6));
}
- | a_expr IN in_expr
+ | a_expr IN_P in_expr
{
/* in_expr returns a SubLink or a list of a_exprs */
if (IsA($3, SubLink))
@@ -5220,7 +5220,7 @@ a_expr: c_expr
$$ = n;
}
}
- | a_expr NOT IN in_expr
+ | a_expr NOT IN_P in_expr
{
/* in_expr returns a SubLink or a list of a_exprs */
if (IsA($4, SubLink))
@@ -5708,7 +5708,7 @@ extract_arg: IDENT { $$ = $1; }
/* position_list uses b_expr not a_expr to avoid conflict with general IN */
-position_list: b_expr IN b_expr
+position_list: b_expr IN_P b_expr
{ $$ = makeList2($3, $1); }
| /*EMPTY*/
{ $$ = NIL; }
@@ -6242,7 +6242,7 @@ unreserved_keyword:
| DECLARE
| DEFERRED
| DEFINER
- | DELETE
+ | DELETE_P
| DELIMITERS
| DOMAIN_P
| DOUBLE
@@ -6303,7 +6303,7 @@ unreserved_keyword:
| OIDS
| OPERATOR
| OPTION
- | OUT
+ | OUT_P
| OWNER
| PARTIAL
| PASSWORD
@@ -6389,14 +6389,14 @@ col_name_keyword:
BIGINT
| BIT
| BOOLEAN
- | CHAR
+ | CHAR_P
| CHARACTER
| COALESCE
| DEC
| DECIMAL
| EXISTS
| EXTRACT
- | FLOAT
+ | FLOAT_P
| INT
| INTEGER
| INTERVAL
@@ -6433,7 +6433,7 @@ func_name_keyword:
| FREEZE
| FULL
| ILIKE
- | IN
+ | IN_P
| INNER_P
| IS
| ISNULL
@@ -6487,7 +6487,7 @@ reserved_keyword:
| FOREIGN
| FROM
| GRANT
- | GROUP
+ | GROUP_P
| HAVING
| INITIALLY
| INTERSECT
diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c
index 2cf91572a00..c60b2df2a6d 100644
--- a/src/backend/parser/keywords.c
+++ b/src/backend/parser/keywords.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.111 2002/05/22 17:20:59 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.112 2002/06/11 13:40:51 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -62,7 +62,7 @@ static const ScanKeyword ScanKeywords[] = {
{"case", CASE},
{"cast", CAST},
{"chain", CHAIN},
- {"char", CHAR},
+ {"char", CHAR_P},
{"character", CHARACTER},
{"characteristics", CHARACTERISTICS},
{"check", CHECK},
@@ -97,7 +97,7 @@ static const ScanKeyword ScanKeywords[] = {
{"deferrable", DEFERRABLE},
{"deferred", DEFERRED},
{"definer", DEFINER},
- {"delete", DELETE},
+ {"delete", DELETE_P},
{"delimiters", DELIMITERS},
{"desc", DESC},
{"distinct", DISTINCT},
@@ -120,7 +120,7 @@ static const ScanKeyword ScanKeywords[] = {
{"extract", EXTRACT},
{"false", FALSE_P},
{"fetch", FETCH},
- {"float", FLOAT},
+ {"float", FLOAT_P},
{"for", FOR},
{"force", FORCE},
{"foreign", FOREIGN},
@@ -131,7 +131,7 @@ static const ScanKeyword ScanKeywords[] = {
{"function", FUNCTION},
{"global", GLOBAL},
{"grant", GRANT},
- {"group", GROUP},
+ {"group", GROUP_P},
{"handler", HANDLER},
{"having", HAVING},
{"hour", HOUR_P},
@@ -139,7 +139,7 @@ static const ScanKeyword ScanKeywords[] = {
{"immediate", IMMEDIATE},
{"immutable", IMMUTABLE},
{"implicit", IMPLICIT},
- {"in", IN},
+ {"in", IN_P},
{"increment", INCREMENT},
{"index", INDEX},
{"inherits", INHERITS},
@@ -208,7 +208,7 @@ static const ScanKeyword ScanKeywords[] = {
{"option", OPTION},
{"or", OR},
{"order", ORDER},
- {"out", OUT},
+ {"out", OUT_P},
{"outer", OUTER_P},
{"overlaps", OVERLAPS},
{"owner", OWNER},
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 5b53e5f77fb..ca96a4482b1 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -14,7 +14,7 @@
*
* The postmaster process creates the shared memory and semaphore
* pools during startup, but as a rule does not touch them itself.
- * In particular, it is not a member of the PROC array of backends
+ * In particular, it is not a member of the PGPROC array of backends
* and so it cannot participate in lock-manager operations. Keeping
* the postmaster away from shared memory operations makes it simpler
* and more reliable. The postmaster is almost always able to recover
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.275 2002/05/28 23:56:51 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.276 2002/06/11 13:40:51 wieck Exp $
*
* NOTES
*
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c
index 6415271bea6..4350548f2ec 100644
--- a/src/backend/storage/ipc/sinval.c
+++ b/src/backend/storage/ipc/sinval.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.47 2002/05/24 18:57:56 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.48 2002/06/11 13:40:51 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -97,7 +97,7 @@ ReceiveSharedInvalidMessages(
* The routines later in this file that use shared mode are okay with
* this, because they aren't looking at the ProcState fields
* associated with SI message transfer; they only use the
- * ProcState array as an easy way to find all the PROC structures.
+ * ProcState array as an easy way to find all the PGPROC structures.
*/
LWLockAcquire(SInvalLock, LW_SHARED);
getResult = SIGetDataEntry(shmInvalBuffer, MyBackendId, &data);
@@ -130,12 +130,12 @@ ReceiveSharedInvalidMessages(
/****************************************************************************/
-/* Functions that need to scan the PROC structures of all running backends. */
+/* Functions that need to scan the PGPROC structures of all running backends. */
/* It's a bit strange to keep these in sinval.c, since they don't have any */
/* direct relationship to shared-cache invalidation. But the procState */
/* array in the SI segment is the only place in the system where we have */
/* an array of per-backend data, so it is the most convenient place to keep */
-/* pointers to the backends' PROC structures. We used to implement these */
+/* pointers to the backends' PGPROC structures. We used to implement these */
/* functions with a slow, ugly search through the ShmemIndex hash table --- */
/* now they are simple loops over the SI ProcState array. */
/****************************************************************************/
@@ -171,7 +171,7 @@ DatabaseHasActiveBackends(Oid databaseId, bool ignoreMyself)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
if (proc->databaseId == databaseId)
{
@@ -208,7 +208,7 @@ TransactionIdIsInProgress(TransactionId xid)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
/* Fetch xid just once - see GetNewTransactionId */
TransactionId pxid = proc->xid;
@@ -260,7 +260,7 @@ GetOldestXmin(bool allDbs)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
if (allDbs || proc->databaseId == MyDatabaseId)
{
@@ -371,7 +371,7 @@ GetSnapshotData(bool serializable)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
/* Fetch xid just once - see GetNewTransactionId */
TransactionId xid = proc->xid;
@@ -460,7 +460,7 @@ CountActiveBackends(void)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
if (proc == MyProc)
continue; /* do not count myself */
@@ -476,7 +476,7 @@ CountActiveBackends(void)
}
/*
- * GetUndoRecPtr -- returns oldest PROC->logRec.
+ * GetUndoRecPtr -- returns oldest PGPROC->logRec.
*/
XLogRecPtr
GetUndoRecPtr(void)
@@ -495,7 +495,7 @@ GetUndoRecPtr(void)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
tempr = proc->logRec;
if (tempr.xrecoff == 0)
@@ -512,13 +512,13 @@ GetUndoRecPtr(void)
}
/*
- * BackendIdGetProc - given a BackendId, find its PROC structure
+ * BackendIdGetProc - given a BackendId, find its PGPROC structure
*
* This is a trivial lookup in the ProcState array. We assume that the caller
* knows that the backend isn't going to go away, so we do not bother with
* locking.
*/
-struct PROC *
+struct PGPROC *
BackendIdGetProc(BackendId procId)
{
SISeg *segP = shmInvalBuffer;
@@ -530,7 +530,7 @@ BackendIdGetProc(BackendId procId)
if (pOffset != INVALID_OFFSET)
{
- PROC *proc = (PROC *) MAKE_PTR(pOffset);
+ PGPROC *proc = (PGPROC *) MAKE_PTR(pOffset);
return proc;
}
diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c
index 70867b65642..9916fd595ea 100644
--- a/src/backend/storage/lmgr/deadlock.c
+++ b/src/backend/storage/lmgr/deadlock.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.8 2001/10/28 06:25:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.9 2002/06/11 13:40:51 wieck Exp $
*
* Interface:
*
@@ -31,8 +31,8 @@
/* One edge in the waits-for graph */
typedef struct
{
- PROC *waiter; /* the waiting process */
- PROC *blocker; /* the process it is waiting for */
+ PGPROC *waiter; /* the waiting process */
+ PGPROC *blocker; /* the process it is waiting for */
int pred; /* workspace for TopoSort */
int link; /* workspace for TopoSort */
} EDGE;
@@ -41,20 +41,20 @@ typedef struct
typedef struct
{
LOCK *lock; /* the lock whose wait queue is described */
- PROC **procs; /* array of PROC *'s in new wait order */
+ PGPROC **procs; /* array of PGPROC *'s in new wait order */
int nProcs;
} WAIT_ORDER;
-static bool DeadLockCheckRecurse(PROC *proc);
-static bool TestConfiguration(PROC *startProc);
-static bool FindLockCycle(PROC *checkProc,
+static bool DeadLockCheckRecurse(PGPROC *proc);
+static bool TestConfiguration(PGPROC *startProc);
+static bool FindLockCycle(PGPROC *checkProc,
EDGE *softEdges, int *nSoftEdges);
-static bool FindLockCycleRecurse(PROC *checkProc,
+static bool FindLockCycleRecurse(PGPROC *checkProc,
EDGE *softEdges, int *nSoftEdges);
static bool ExpandConstraints(EDGE *constraints, int nConstraints);
static bool TopoSort(LOCK *lock, EDGE *constraints, int nConstraints,
- PROC **ordering);
+ PGPROC **ordering);
#ifdef DEBUG_DEADLOCK
static void PrintLockQueue(LOCK *lock, const char *info);
@@ -66,18 +66,18 @@ static void PrintLockQueue(LOCK *lock, const char *info);
*/
/* Workspace for FindLockCycle */
-static PROC **visitedProcs; /* Array of visited procs */
+static PGPROC **visitedProcs; /* Array of visited procs */
static int nVisitedProcs;
/* Workspace for TopoSort */
-static PROC **topoProcs; /* Array of not-yet-output procs */
+static PGPROC **topoProcs; /* Array of not-yet-output procs */
static int *beforeConstraints; /* Counts of remaining before-constraints */
static int *afterConstraints; /* List head for after-constraints */
/* Output area for ExpandConstraints */
static WAIT_ORDER *waitOrders; /* Array of proposed queue rearrangements */
static int nWaitOrders;
-static PROC **waitOrderProcs; /* Space for waitOrders queue contents */
+static PGPROC **waitOrderProcs; /* Space for waitOrders queue contents */
/* Current list of constraints being considered */
static EDGE *curConstraints;
@@ -111,7 +111,7 @@ InitDeadLockChecking(void)
/*
* FindLockCycle needs at most MaxBackends entries in visitedProcs[]
*/
- visitedProcs = (PROC **) palloc(MaxBackends * sizeof(PROC *));
+ visitedProcs = (PGPROC **) palloc(MaxBackends * sizeof(PGPROC *));
/*
* TopoSort needs to consider at most MaxBackends wait-queue entries,
@@ -128,7 +128,7 @@ InitDeadLockChecking(void)
* than MaxBackends total waiters.
*/
waitOrders = (WAIT_ORDER *) palloc((MaxBackends / 2) * sizeof(WAIT_ORDER));
- waitOrderProcs = (PROC **) palloc(MaxBackends * sizeof(PROC *));
+ waitOrderProcs = (PGPROC **) palloc(MaxBackends * sizeof(PGPROC *));
/*
* Allow at most MaxBackends distinct constraints in a configuration.
@@ -176,7 +176,7 @@ InitDeadLockChecking(void)
* interlocked!
*/
bool
-DeadLockCheck(PROC *proc)
+DeadLockCheck(PGPROC *proc)
{
int i,
j;
@@ -194,7 +194,7 @@ DeadLockCheck(PROC *proc)
for (i = 0; i < nWaitOrders; i++)
{
LOCK *lock = waitOrders[i].lock;
- PROC **procs = waitOrders[i].procs;
+ PGPROC **procs = waitOrders[i].procs;
int nProcs = waitOrders[i].nProcs;
PROC_QUEUE *waitQueue = &(lock->waitProcs);
@@ -234,7 +234,7 @@ DeadLockCheck(PROC *proc)
* rearrangements of lock wait queues (if any).
*/
static bool
-DeadLockCheckRecurse(PROC *proc)
+DeadLockCheckRecurse(PGPROC *proc)
{
int nEdges;
int oldPossibleConstraints;
@@ -300,7 +300,7 @@ DeadLockCheckRecurse(PROC *proc)
*--------------------
*/
static bool
-TestConfiguration(PROC *startProc)
+TestConfiguration(PGPROC *startProc)
{
int softFound = 0;
EDGE *softEdges = possibleConstraints + nPossibleConstraints;
@@ -365,7 +365,7 @@ TestConfiguration(PROC *startProc)
* be believed in preference to the actual ordering seen in the locktable.
*/
static bool
-FindLockCycle(PROC *checkProc,
+FindLockCycle(PGPROC *checkProc,
EDGE *softEdges, /* output argument */
int *nSoftEdges) /* output argument */
{
@@ -375,11 +375,11 @@ FindLockCycle(PROC *checkProc,
}
static bool
-FindLockCycleRecurse(PROC *checkProc,
+FindLockCycleRecurse(PGPROC *checkProc,
EDGE *softEdges, /* output argument */
int *nSoftEdges) /* output argument */
{
- PROC *proc;
+ PGPROC *proc;
LOCK *lock;
HOLDER *holder;
SHM_QUEUE *lockHolders;
@@ -438,7 +438,7 @@ FindLockCycleRecurse(PROC *checkProc,
while (holder)
{
- proc = (PROC *) MAKE_PTR(holder->tag.proc);
+ proc = (PGPROC *) MAKE_PTR(holder->tag.proc);
/* A proc never blocks itself */
if (proc != checkProc)
@@ -480,7 +480,7 @@ FindLockCycleRecurse(PROC *checkProc,
if (i < nWaitOrders)
{
/* Use the given hypothetical wait queue order */
- PROC **procs = waitOrders[i].procs;
+ PGPROC **procs = waitOrders[i].procs;
queue_size = waitOrders[i].nProcs;
@@ -517,7 +517,7 @@ FindLockCycleRecurse(PROC *checkProc,
waitQueue = &(lock->waitProcs);
queue_size = waitQueue->size;
- proc = (PROC *) MAKE_PTR(waitQueue->links.next);
+ proc = (PGPROC *) MAKE_PTR(waitQueue->links.next);
while (queue_size-- > 0)
{
@@ -543,7 +543,7 @@ FindLockCycleRecurse(PROC *checkProc,
}
}
- proc = (PROC *) MAKE_PTR(proc->links.next);
+ proc = (PGPROC *) MAKE_PTR(proc->links.next);
}
}
@@ -559,7 +559,7 @@ FindLockCycleRecurse(PROC *checkProc,
* specific new orderings for affected wait queues
*
* Input is a list of soft edges to be reversed. The output is a list
- * of nWaitOrders WAIT_ORDER structs in waitOrders[], with PROC array
+ * of nWaitOrders WAIT_ORDER structs in waitOrders[], with PGPROC array
* workspace in waitOrderProcs[].
*
* Returns TRUE if able to build an ordering that satisfies all the
@@ -582,7 +582,7 @@ ExpandConstraints(EDGE *constraints,
*/
for (i = nConstraints; --i >= 0;)
{
- PROC *proc = constraints[i].waiter;
+ PGPROC *proc = constraints[i].waiter;
LOCK *lock = proc->waitLock;
/* Did we already make a list for this lock? */
@@ -628,7 +628,7 @@ ExpandConstraints(EDGE *constraints,
* slowness of the algorithm won't really matter.
*
* The initial queue ordering is taken directly from the lock's wait queue.
- * The output is an array of PROC pointers, of length equal to the lock's
+ * The output is an array of PGPROC pointers, of length equal to the lock's
* wait queue length (the caller is responsible for providing this space).
* The partial order is specified by an array of EDGE structs. Each EDGE
* is one that we need to reverse, therefore the "waiter" must appear before
@@ -642,22 +642,22 @@ static bool
TopoSort(LOCK *lock,
EDGE *constraints,
int nConstraints,
- PROC **ordering) /* output argument */
+ PGPROC **ordering) /* output argument */
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
int queue_size = waitQueue->size;
- PROC *proc;
+ PGPROC *proc;
int i,
j,
k,
last;
/* First, fill topoProcs[] array with the procs in their current order */
- proc = (PROC *) MAKE_PTR(waitQueue->links.next);
+ proc = (PGPROC *) MAKE_PTR(waitQueue->links.next);
for (i = 0; i < queue_size; i++)
{
topoProcs[i] = proc;
- proc = (PROC *) MAKE_PTR(proc->links.next);
+ proc = (PGPROC *) MAKE_PTR(proc->links.next);
}
/*
@@ -743,15 +743,15 @@ PrintLockQueue(LOCK *lock, const char *info)
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
int queue_size = waitQueue->size;
- PROC *proc;
+ PGPROC *proc;
int i;
printf("%s lock %lx queue ", info, MAKE_OFFSET(lock));
- proc = (PROC *) MAKE_PTR(waitQueue->links.next);
+ proc = (PGPROC *) MAKE_PTR(waitQueue->links.next);
for (i = 0; i < queue_size; i++)
{
printf(" %d", proc->pid);
- proc = (PROC *) MAKE_PTR(proc->links.next);
+ proc = (PGPROC *) MAKE_PTR(proc->links.next);
}
printf("\n");
fflush(stdout);
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 88f30496543..d3965fab95e 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.106 2002/03/06 06:10:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.107 2002/06/11 13:40:51 wieck Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -49,7 +49,7 @@ int max_locks_per_xact; /* set by guc.c */
static int WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
LOCK *lock, HOLDER *holder);
-static void LockCountMyLocks(SHMEM_OFFSET lockOffset, PROC *proc,
+static void LockCountMyLocks(SHMEM_OFFSET lockOffset, PGPROC *proc,
int *myHolding);
static char *lock_mode_names[] =
@@ -746,7 +746,7 @@ LockCheckConflicts(LOCKMETHODTABLE *lockMethodTable,
LOCKMODE lockmode,
LOCK *lock,
HOLDER *holder,
- PROC *proc,
+ PGPROC *proc,
int *myHolding) /* myHolding[] array or NULL */
{
LOCKMETHODCTL *lockctl = lockMethodTable->ctl;
@@ -820,7 +820,7 @@ LockCheckConflicts(LOCKMETHODTABLE *lockMethodTable,
* be a net slowdown.
*/
static void
-LockCountMyLocks(SHMEM_OFFSET lockOffset, PROC *proc, int *myHolding)
+LockCountMyLocks(SHMEM_OFFSET lockOffset, PGPROC *proc, int *myHolding)
{
SHM_QUEUE *procHolders = &(proc->procHolders);
HOLDER *holder;
@@ -944,7 +944,7 @@ WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
* this routine can only happen if we are aborting the transaction.)
*/
void
-RemoveFromWaitQueue(PROC *proc)
+RemoveFromWaitQueue(PGPROC *proc)
{
LOCK *waitLock = proc->waitLock;
LOCKMODE lockmode = proc->waitLockMode;
@@ -1182,7 +1182,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag,
* specified XID are released.
*/
bool
-LockReleaseAll(LOCKMETHOD lockmethod, PROC *proc,
+LockReleaseAll(LOCKMETHOD lockmethod, PGPROC *proc,
bool allxids, TransactionId xid)
{
SHM_QUEUE *procHolders = &(proc->procHolders);
@@ -1354,7 +1354,7 @@ LockShmemSize(int maxBackends)
long max_table_size = NLOCKENTS(maxBackends);
size += MAXALIGN(sizeof(PROC_HDR)); /* ProcGlobal */
- size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
+ size += maxBackends * MAXALIGN(sizeof(PGPROC)); /* each MyProc */
size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each
* lockMethodTable->ctl */
@@ -1383,7 +1383,7 @@ LockShmemSize(int maxBackends)
void
DumpLocks(void)
{
- PROC *proc;
+ PGPROC *proc;
SHM_QUEUE *procHolders;
HOLDER *holder;
LOCK *lock;
@@ -1427,7 +1427,7 @@ DumpLocks(void)
void
DumpAllLocks(void)
{
- PROC *proc;
+ PGPROC *proc;
HOLDER *holder;
LOCK *lock;
int lockmethod = DEFAULT_LOCKMETHOD;
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index 8dbf55c0788..e781f856d1a 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.10 2002/05/05 00:03:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.11 2002/06/11 13:40:51 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,12 +29,12 @@
typedef struct LWLock
{
- slock_t mutex; /* Protects LWLock and queue of PROCs */
+ slock_t mutex; /* Protects LWLock and queue of PGPROCs */
bool releaseOK; /* T if ok to release waiters */
char exclusive; /* # of exclusive holders (0 or 1) */
int shared; /* # of shared holders (0..MaxBackends) */
- PROC *head; /* head of list of waiting PROCs */
- PROC *tail; /* tail of list of waiting PROCs */
+ PGPROC *head; /* head of list of waiting PGPROCs */
+ PGPROC *tail; /* tail of list of waiting PGPROCs */
/* tail is undefined when head is NULL */
} LWLock;
@@ -197,7 +197,7 @@ void
LWLockAcquire(LWLockId lockid, LWLockMode mode)
{
volatile LWLock *lock = LWLockArray + lockid;
- PROC *proc = MyProc;
+ PGPROC *proc = MyProc;
bool retry = false;
int extraWaits = 0;
@@ -266,12 +266,12 @@ LWLockAcquire(LWLockId lockid, LWLockMode mode)
/*
* Add myself to wait queue.
*
- * If we don't have a PROC structure, there's no way to wait. This
+ * If we don't have a PGPROC structure, there's no way to wait. This
* should never occur, since MyProc should only be null during
* shared memory initialization.
*/
if (proc == NULL)
- elog(FATAL, "LWLockAcquire: can't wait without a PROC structure");
+ elog(FATAL, "LWLockAcquire: can't wait without a PGPROC structure");
proc->lwWaiting = true;
proc->lwExclusive = (mode == LW_EXCLUSIVE);
@@ -401,8 +401,8 @@ void
LWLockRelease(LWLockId lockid)
{
volatile LWLock *lock = LWLockArray + lockid;
- PROC *head;
- PROC *proc;
+ PGPROC *head;
+ PGPROC *proc;
int i;
PRINT_LWDEBUG("LWLockRelease", lockid, lock);
@@ -446,7 +446,7 @@ LWLockRelease(LWLockId lockid)
if (lock->exclusive == 0 && lock->shared == 0 && lock->releaseOK)
{
/*
- * Remove the to-be-awakened PROCs from the queue. If the
+ * Remove the to-be-awakened PGPROCs from the queue. If the
* front waiter wants exclusive lock, awaken him only.
* Otherwise awaken as many waiters as want shared access.
*/
@@ -459,7 +459,7 @@ LWLockRelease(LWLockId lockid)
proc = proc->lwWaitLink;
}
}
- /* proc is now the last PROC to be released */
+ /* proc is now the last PGPROC to be released */
lock->head = proc->lwWaitLink;
proc->lwWaitLink = NULL;
/* prevent additional wakeups until retryer gets to run */
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 8ccaff94776..b7ac29b1df5 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.119 2002/05/05 00:03:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.120 2002/06/11 13:40:51 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,12 +55,12 @@
int DeadlockTimeout = 1000;
-PROC *MyProc = NULL;
+PGPROC *MyProc = NULL;
/*
- * This spinlock protects the freelist of recycled PROC structures.
+ * This spinlock protects the freelist of recycled PGPROC structures.
* We cannot use an LWLock because the LWLock manager depends on already
- * having a PROC and a wait semaphore! But these structures are touched
+ * having a PGPROC and a wait semaphore! But these structures are touched
* relatively infrequently (only at backend startup or shutdown) and not for
* very long, so a spinlock is okay.
*/
@@ -68,7 +68,7 @@ static slock_t *ProcStructLock = NULL;
static PROC_HDR *ProcGlobal = NULL;
-static PROC *DummyProc = NULL;
+static PGPROC *DummyProc = NULL;
static bool waitingForLock = false;
static bool waitingForSignal = false;
@@ -129,29 +129,29 @@ InitProcGlobal(int maxBackends)
ProcGlobal->freeProcs = INVALID_OFFSET;
/*
- * Pre-create the PROC structures and create a semaphore for each.
+ * Pre-create the PGPROC structures and create a semaphore for each.
*/
for (i = 0; i < maxBackends; i++)
{
- PROC *proc;
+ PGPROC *proc;
- proc = (PROC *) ShmemAlloc(sizeof(PROC));
+ proc = (PGPROC *) ShmemAlloc(sizeof(PGPROC));
if (!proc)
elog(FATAL, "cannot create new proc: out of memory");
- MemSet(proc, 0, sizeof(PROC));
+ MemSet(proc, 0, sizeof(PGPROC));
PGSemaphoreCreate(&proc->sem);
proc->links.next = ProcGlobal->freeProcs;
ProcGlobal->freeProcs = MAKE_OFFSET(proc);
}
/*
- * Pre-allocate a PROC structure for dummy (checkpoint) processes,
+ * Pre-allocate a PGPROC structure for dummy (checkpoint) processes,
* too. This does not get linked into the freeProcs list.
*/
- DummyProc = (PROC *) ShmemAlloc(sizeof(PROC));
+ DummyProc = (PGPROC *) ShmemAlloc(sizeof(PGPROC));
if (!DummyProc)
elog(FATAL, "cannot create new proc: out of memory");
- MemSet(DummyProc, 0, sizeof(PROC));
+ MemSet(DummyProc, 0, sizeof(PGPROC));
DummyProc->pid = 0; /* marks DummyProc as not in use */
PGSemaphoreCreate(&DummyProc->sem);
@@ -183,7 +183,7 @@ InitProcess(void)
/*
* Try to get a proc struct from the free list. If this fails,
- * we must be out of PROC structures (not to mention semaphores).
+ * we must be out of PGPROC structures (not to mention semaphores).
*/
SpinLockAcquire(ProcStructLock);
@@ -191,14 +191,14 @@ InitProcess(void)
if (myOffset != INVALID_OFFSET)
{
- MyProc = (PROC *) MAKE_PTR(myOffset);
+ MyProc = (PGPROC *) MAKE_PTR(myOffset);
procglobal->freeProcs = MyProc->links.next;
SpinLockRelease(ProcStructLock);
}
else
{
/*
- * If we reach here, all the PROCs are in use. This is one of
+ * If we reach here, all the PGPROCs are in use. This is one of
* the possible places to detect "too many backends", so give the
* standard error message.
*/
@@ -236,7 +236,7 @@ InitProcess(void)
PGSemaphoreReset(&MyProc->sem);
/*
- * Now that we have a PROC, we could try to acquire locks, so
+ * Now that we have a PGPROC, we could try to acquire locks, so
* initialize the deadlock checker.
*/
InitDeadLockChecking();
@@ -246,7 +246,7 @@ InitProcess(void)
* InitDummyProcess -- create a dummy per-process data structure
*
* This is called by checkpoint processes so that they will have a MyProc
- * value that's real enough to let them wait for LWLocks. The PROC and
+ * value that's real enough to let them wait for LWLocks. The PGPROC and
* sema that are assigned are the extra ones created during InitProcGlobal.
*/
void
@@ -402,11 +402,11 @@ ProcKill(void)
SpinLockAcquire(ProcStructLock);
- /* Return PROC structure (and semaphore) to freelist */
+ /* Return PGPROC structure (and semaphore) to freelist */
MyProc->links.next = procglobal->freeProcs;
procglobal->freeProcs = MAKE_OFFSET(MyProc);
- /* PROC struct isn't mine anymore */
+ /* PGPROC struct isn't mine anymore */
MyProc = NULL;
SpinLockRelease(ProcStructLock);
@@ -414,7 +414,7 @@ ProcKill(void)
/*
* DummyProcKill() -- Cut-down version of ProcKill for dummy (checkpoint)
- * processes. The PROC and sema are not released, only marked
+ * processes. The PGPROC and sema are not released, only marked
* as not-in-use.
*/
static void
@@ -433,7 +433,7 @@ DummyProcKill(void)
/* Mark DummyProc no longer in use */
MyProc->pid = 0;
- /* PROC struct isn't mine anymore */
+ /* PGPROC struct isn't mine anymore */
MyProc = NULL;
}
@@ -506,7 +506,7 @@ ProcSleep(LOCKMETHODTABLE *lockMethodTable,
PROC_QUEUE *waitQueue = &(lock->waitProcs);
int myHeldLocks = MyProc->heldLocks;
bool early_deadlock = false;
- PROC *proc;
+ PGPROC *proc;
int i;
/*
@@ -531,7 +531,7 @@ ProcSleep(LOCKMETHODTABLE *lockMethodTable,
{
int aheadRequests = 0;
- proc = (PROC *) MAKE_PTR(waitQueue->links.next);
+ proc = (PGPROC *) MAKE_PTR(waitQueue->links.next);
for (i = 0; i < waitQueue->size; i++)
{
/* Must he wait for me? */
@@ -568,7 +568,7 @@ ProcSleep(LOCKMETHODTABLE *lockMethodTable,
}
/* Nope, so advance to next waiter */
aheadRequests |= (1 << proc->waitLockMode);
- proc = (PROC *) MAKE_PTR(proc->links.next);
+ proc = (PGPROC *) MAKE_PTR(proc->links.next);
}
/*
@@ -579,7 +579,7 @@ ProcSleep(LOCKMETHODTABLE *lockMethodTable,
else
{
/* I hold no locks, so I can't push in front of anyone. */
- proc = (PROC *) &(waitQueue->links);
+ proc = (PGPROC *) &(waitQueue->links);
}
/*
@@ -591,7 +591,7 @@ ProcSleep(LOCKMETHODTABLE *lockMethodTable,
lock->waitMask |= (1 << lockmode);
- /* Set up wait information in PROC object, too */
+ /* Set up wait information in PGPROC object, too */
MyProc->waitLock = lock;
MyProc->waitHolder = holder;
MyProc->waitLockMode = lockmode;
@@ -685,20 +685,20 @@ ProcSleep(LOCKMETHODTABLE *lockMethodTable,
* works correctly for that case. To clean up in failure case, would need
* to twiddle the lock's request counts too --- see RemoveFromWaitQueue.
*/
-PROC *
-ProcWakeup(PROC *proc, int errType)
+PGPROC *
+ProcWakeup(PGPROC *proc, int errType)
{
- PROC *retProc;
+ PGPROC *retProc;
/* assume that masterLock has been acquired */
/* Proc should be sleeping ... */
if (proc->links.prev == INVALID_OFFSET ||
proc->links.next == INVALID_OFFSET)
- return (PROC *) NULL;
+ return (PGPROC *) NULL;
/* Save next process before we zap the list link */
- retProc = (PROC *) MAKE_PTR(proc->links.next);
+ retProc = (PGPROC *) MAKE_PTR(proc->links.next);
/* Remove process from wait queue */
SHMQueueDelete(&(proc->links));
@@ -726,7 +726,7 @@ ProcLockWakeup(LOCKMETHODTABLE *lockMethodTable, LOCK *lock)
LOCKMETHODCTL *lockctl = lockMethodTable->ctl;
PROC_QUEUE *waitQueue = &(lock->waitProcs);
int queue_size = waitQueue->size;
- PROC *proc;
+ PGPROC *proc;
int aheadRequests = 0;
Assert(queue_size >= 0);
@@ -734,7 +734,7 @@ ProcLockWakeup(LOCKMETHODTABLE *lockMethodTable, LOCK *lock)
if (queue_size == 0)
return;
- proc = (PROC *) MAKE_PTR(waitQueue->links.next);
+ proc = (PGPROC *) MAKE_PTR(waitQueue->links.next);
while (queue_size-- > 0)
{
@@ -769,7 +769,7 @@ ProcLockWakeup(LOCKMETHODTABLE *lockMethodTable, LOCK *lock)
* checks.
*/
aheadRequests |= (1 << lockmode);
- proc = (PROC *) MAKE_PTR(proc->links.next);
+ proc = (PGPROC *) MAKE_PTR(proc->links.next);
}
}
@@ -902,7 +902,7 @@ ProcCancelWaitForSignal(void)
void
ProcSendSignal(BackendId procId)
{
- PROC *proc = BackendIdGetProc(procId);
+ PGPROC *proc = BackendIdGetProc(procId);
if (proc != NULL)
PGSemaphoreUnlock(&proc->sem);
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index eac2371040f..6e0c0b71301 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.67 2002/06/01 15:52:15 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.68 2002/06/11 13:40:52 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -69,7 +69,7 @@ date_in(PG_FUNCTION_ARGS)
case DTK_CURRENT:
elog(ERROR, "Date CURRENT no longer supported"
"\n\tdate_in() internal coding error");
- GetCurrentTime(tm);
+ GetCurrentDateTime(tm);
break;
case DTK_EPOCH:
@@ -1697,7 +1697,7 @@ time_timetz(PG_FUNCTION_ARGS)
fsec_t fsec;
int tz;
- GetCurrentTime(tm);
+ GetCurrentDateTime(tm);
time2tm(time, tm, &fsec);
tz = DetermineLocalTimeZone(tm);
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index d6e0358e817..c5dd8036f57 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.90 2002/05/17 01:19:18 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.91 2002/06/11 13:40:52 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,7 +83,7 @@ static datetkn datetktbl[] = {
{"acst", DTZ, NEG(24)}, /* Atlantic/Porto Acre */
{"act", TZ, NEG(30)}, /* Atlantic/Porto Acre */
{DA_D, ADBC, AD}, /* "ad" for years >= 0 */
- {"abstime", IGNORE, 0}, /* for pre-v6.1 "Invalid Abstime" */
+ {"abstime", IGNORE_DTF, 0}, /* for pre-v6.1 "Invalid Abstime" */
{"adt", DTZ, NEG(18)}, /* Atlantic Daylight Time */
{"aesst", DTZ, 66}, /* E. Australia */
{"aest", TZ, 60}, /* Australia Eastern Std Time */
@@ -115,7 +115,7 @@ ast /* Atlantic Standard Time, Arabia Standard Time, Acre Standard Time */
{"apr", MONTH, 4},
{"april", MONTH, 4},
{"ast", TZ, NEG(24)}, /* Atlantic Std Time (Canada) */
- {"at", IGNORE, 0}, /* "at" (throwaway) */
+ {"at", IGNORE_DTF, 0}, /* "at" (throwaway) */
{"aug", MONTH, 8},
{"august", MONTH, 8},
{"awsst", DTZ, 54}, /* W. Australia */
@@ -348,7 +348,7 @@ ncst
{"october", MONTH, 10},
{"omsst", DTZ, 42}, /* Omsk Summer Time */
{"omst", TZ, 36}, /* Omsk Time */
- {"on", IGNORE, 0}, /* "on" (throwaway) */
+ {"on", IGNORE_DTF, 0}, /* "on" (throwaway) */
{"pdt", DTZ, NEG(42)}, /* Pacific Daylight Time */
#if 0
pest
@@ -494,7 +494,7 @@ sizeof australian_datetktbl[0];
static datetkn deltatktbl[] = {
/* text, token, lexval */
- {"@", IGNORE, 0}, /* postgres relative prefix */
+ {"@", IGNORE_DTF, 0}, /* postgres relative prefix */
{DAGO, AGO, 0}, /* "ago" indicates negative time offset */
{"c", UNITS, DTK_CENTURY}, /* "century" relative */
{"cent", UNITS, DTK_CENTURY}, /* "century" relative */
@@ -536,7 +536,7 @@ static datetkn deltatktbl[] = {
{"msecs", UNITS, DTK_MILLISEC},
{"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative */
{DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */
- {"reltime", IGNORE, 0}, /* pre-v6.1 "Undefined Reltime" */
+ {"reltime", IGNORE_DTF, 0}, /* pre-v6.1 "Undefined Reltime" */
{"s", UNITS, DTK_SECOND},
{"sec", UNITS, DTK_SECOND},
{DSECOND, UNITS, DTK_SECOND},
@@ -1198,7 +1198,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
case DTK_STRING:
case DTK_SPECIAL:
type = DecodeSpecial(i, field[i], &val);
- if (type == IGNORE)
+ if (type == IGNORE_DTF)
continue;
tmask = DTK_M(type);
@@ -1223,7 +1223,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
case DTK_YESTERDAY:
tmask = DTK_DATE_M;
*dtype = DTK_DATE;
- GetCurrentTime(tm);
+ GetCurrentDateTime(tm);
j2date((date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - 1),
&tm->tm_year, &tm->tm_mon, &tm->tm_mday);
tm->tm_hour = 0;
@@ -1234,7 +1234,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
case DTK_TODAY:
tmask = DTK_DATE_M;
*dtype = DTK_DATE;
- GetCurrentTime(tm);
+ GetCurrentDateTime(tm);
tm->tm_hour = 0;
tm->tm_min = 0;
tm->tm_sec = 0;
@@ -1243,7 +1243,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
case DTK_TOMORROW:
tmask = DTK_DATE_M;
*dtype = DTK_DATE;
- GetCurrentTime(tm);
+ GetCurrentDateTime(tm);
j2date((date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) + 1),
&tm->tm_year, &tm->tm_mon, &tm->tm_mday);
tm->tm_hour = 0;
@@ -1319,7 +1319,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
ftype[i] = DTK_TZ;
break;
- case IGNORE:
+ case IGNORE_DTF:
break;
case AMPM:
@@ -1815,7 +1815,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
case DTK_STRING:
case DTK_SPECIAL:
type = DecodeSpecial(i, field[i], &val);
- if (type == IGNORE)
+ if (type == IGNORE_DTF)
continue;
tmask = DTK_M(type);
@@ -1885,7 +1885,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
ftype[i] = DTK_TZ;
break;
- case IGNORE:
+ case IGNORE_DTF:
break;
case AMPM:
@@ -1967,7 +1967,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
if ((fmask & DTK_DATE_M) == 0)
{
- GetCurrentTime(tmp);
+ GetCurrentDateTime(tmp);
}
else
{
@@ -2043,7 +2043,7 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm)
if (isalpha((unsigned char) *field[i]))
{
type = DecodeSpecial(i, field[i], &val);
- if (type == IGNORE)
+ if (type == IGNORE_DTF)
continue;
dmask = DTK_M(type);
@@ -2576,7 +2576,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse
*dtype = DTK_DELTA;
- type = IGNORE;
+ type = IGNORE_DTF;
tm->tm_year = 0;
tm->tm_mon = 0;
tm->tm_mday = 0;
@@ -2633,7 +2633,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse
tmask = DTK_M(TZ);
break;
}
- else if (type == IGNORE)
+ else if (type == IGNORE_DTF)
{
if (*cp == '.')
{
@@ -2658,7 +2658,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse
case DTK_NUMBER:
val = strtol(field[i], &cp, 10);
- if (type == IGNORE)
+ if (type == IGNORE_DTF)
type = DTK_SECOND;
if (*cp == '.')
@@ -2826,7 +2826,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse
case DTK_STRING:
case DTK_SPECIAL:
type = DecodeUnits(i, field[i], &val);
- if (type == IGNORE)
+ if (type == IGNORE_DTF)
continue;
tmask = 0; /* DTK_M(type); */
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 651ca00d78e..98adb9a1946 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.93 2002/04/21 19:48:12 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.94 2002/06/11 13:40:52 wieck Exp $
*
* NOTES
*
@@ -239,14 +239,14 @@ GetCurrentAbsoluteTimeUsec(int *usec)
void
-GetCurrentTime(struct tm * tm)
+GetCurrentDateTime(struct tm * tm)
{
int tz;
abstime2tm(GetCurrentTransactionStartTime(), &tz, tm, NULL);
return;
-} /* GetCurrentTime() */
+} /* GetCurrentDateTime() */
void
diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c
index 8ffaa6e4f44..3777bab9395 100644
--- a/src/backend/utils/adt/name.c
+++ b/src/backend/utils/adt/name.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.35 2002/05/17 20:53:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.36 2002/06/11 13:40:52 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -219,13 +219,13 @@ namestrcmp(Name name, const char *str)
Datum
current_user(PG_FUNCTION_ARGS)
{
- PG_RETURN_DATUM(DirectFunctionCall1(namein, CStringGetDatum(GetUserName(GetUserId()))));
+ PG_RETURN_DATUM(DirectFunctionCall1(namein, CStringGetDatum(GetUserNameFromId(GetUserId()))));
}
Datum
session_user(PG_FUNCTION_ARGS)
{
- PG_RETURN_DATUM(DirectFunctionCall1(namein, CStringGetDatum(GetUserName(GetSessionUserId()))));
+ PG_RETURN_DATUM(DirectFunctionCall1(namein, CStringGetDatum(GetUserNameFromId(GetSessionUserId()))));
}
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index fd3f191d5cd..b602ba8796e 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.91 2002/05/17 01:19:18 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.92 2002/06/11 13:40:52 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -676,7 +676,7 @@ SetSessionAuthorization(Oid userid)
* Get user name from user id
*/
char *
-GetUserName(Oid userid)
+GetUserNameFromId(Oid userid)
{
HeapTuple tuple;
char *result;
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 5c0fd2d3ea7..04cd1dd6311 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.106 2002/05/20 23:51:43 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.107 2002/06/11 13:40:52 wieck Exp $
*
*
*-------------------------------------------------------------------------
@@ -286,9 +286,9 @@ InitPostgres(const char *dbname, const char *username)
*/
/*
- * Set up my per-backend PROC struct in shared memory. (We need to
+ * Set up my per-backend PGPROC struct in shared memory. (We need to
* know MyDatabaseId before we can do this, since it's entered into
- * the PROC struct.)
+ * the PGPROC struct.)
*/
InitProcess();