Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit469cb65

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Katherine Ward wrote:
> Changes to avoid collisions with WIN32 & MFC names...> 1. Renamed:> a. PROC => PGPROC> b. GetUserName() => GetUserNameFromId()> c. GetCurrentTime() => GetCurrentDateTime()> d. IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim>> 2. Added _P to some lex/yacc tokens:> CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUTJan
1 parent3b993ac commit469cb65

File tree

34 files changed

+306
-306
lines changed

34 files changed

+306
-306
lines changed

‎src/backend/access/transam/transam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.51 2002/05/25 20:00:11 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.52 2002/06/11 13:40:50 wieck Exp $
1212
*
1313
* NOTES
1414
* This file contains the high level access-method interface to the
@@ -201,7 +201,7 @@ TransactionIdDidAbort(TransactionId transactionId)
201201

202202
/*
203203
* Now this func in shmem.c and gives quality answer by scanning
204-
*PROC structures of all running backend. - vadim 11/26/96
204+
*PGPROC structures of all running backend. - vadim 11/26/96
205205
*
206206
* Old comments:
207207
* true if given transaction has neither committed nor aborted

‎src/backend/access/transam/varsup.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2000, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.49 2002/05/25 20:00:11 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.50 2002/06/11 13:40:50 wieck Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -61,23 +61,23 @@ GetNewTransactionId(void)
6161
* Must set MyProc->xid before releasing XidGenLock. This ensures
6262
* that when GetSnapshotData calls ReadNewTransactionId, all active
6363
* XIDs before the returned value of nextXid are already present in
64-
* the sharedPROC array. Else we have a race condition.
64+
* the sharedPGPROC array. Else we have a race condition.
6565
*
6666
* XXX by storing xid into MyProc without acquiring SInvalLock, we are
6767
* relying on fetch/store of an xid to be atomic, else other backends
6868
* might see a partially-set xid here.But holding both locks at once
6969
* would be a nasty concurrency hit (and in fact could cause a
7070
* deadlock against GetSnapshotData). So for now, assume atomicity.
71-
* Note that readers ofPROC xid field should be careful to fetch the
71+
* Note that readers ofPGPROC xid field should be careful to fetch the
7272
* value only once, rather than assume they can read it multiple times
7373
* and get the same answer each time.
7474
*
75-
* A solution to the atomic-store problem would be to give eachPROC its
76-
* own spinlock used only for fetching/storing thatPROC's xid.
75+
* A solution to the atomic-store problem would be to give eachPGPROC its
76+
* own spinlock used only for fetching/storing thatPGPROC's xid.
7777
* (SInvalLock would then mean primarily that PROCs couldn't be added/
7878
* removed while holding the lock.)
7979
*/
80-
if (MyProc!= (PROC*)NULL)
80+
if (MyProc!= (PGPROC*)NULL)
8181
MyProc->xid=xid;
8282

8383
LWLockRelease(XidGenLock);

‎src/backend/access/transam/xact.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.125 2002/05/25 20:00:12 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.126 2002/06/11 13:40:50 wieck Exp $
1212
*
1313
* NOTES
1414
*Transaction aborts can now occur two ways:
@@ -602,7 +602,7 @@ RecordTransactionCommit(void)
602602
MyLastRecPtr.xrecoff=0;
603603
MyXactMadeXLogEntry= false;
604604

605-
/* Show myself as out of the transaction inPROC array */
605+
/* Show myself as out of the transaction inPGPROC array */
606606
MyProc->logRec.xrecoff=0;
607607

608608
if (leak)
@@ -727,7 +727,7 @@ RecordTransactionAbort(void)
727727
MyLastRecPtr.xrecoff=0;
728728
MyXactMadeXLogEntry= false;
729729

730-
/* Show myself as out of the transaction inPROC array */
730+
/* Show myself as out of the transaction inPGPROC array */
731731
MyProc->logRec.xrecoff=0;
732732

733733
/*
@@ -960,7 +960,7 @@ CommitTransaction(void)
960960
* as running as well or it will see two tuple versions - one deleted
961961
* by xid 1 and one inserted by xid 0.See notes in GetSnapshotData.
962962
*/
963-
if (MyProc!= (PROC*)NULL)
963+
if (MyProc!= (PGPROC*)NULL)
964964
{
965965
/* Lock SInvalLock because that's what GetSnapshotData uses. */
966966
LWLockAcquire(SInvalLock,LW_EXCLUSIVE);
@@ -1069,7 +1069,7 @@ AbortTransaction(void)
10691069
* this must be done _before_ releasing locks we hold and _after_
10701070
* RecordTransactionAbort.
10711071
*/
1072-
if (MyProc!= (PROC*)NULL)
1072+
if (MyProc!= (PGPROC*)NULL)
10731073
{
10741074
/* Lock SInvalLock because that's what GetSnapshotData uses. */
10751075
LWLockAcquire(SInvalLock,LW_EXCLUSIVE);

‎src/backend/access/transam/xlog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.96 2002/06/07 21:47:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.97 2002/06/11 13:40:50 wieck Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -753,7 +753,7 @@ begin:;
753753
/* Compute record's XLOG location */
754754
INSERT_RECPTR(RecPtr,Insert,curridx);
755755

756-
/* If first XLOG record of transaction, save it inPROC array */
756+
/* If first XLOG record of transaction, save it inPGPROC array */
757757
if (MyLastRecPtr.xrecoff==0&& !no_tran)
758758
{
759759
/*
@@ -3026,7 +3026,7 @@ CreateCheckPoint(bool shutdown)
30263026
}
30273027

30283028
/*
3029-
* Get UNDO record ptr - this is oldest ofPROC->logRec values. We do
3029+
* Get UNDO record ptr - this is oldest ofPGPROC->logRec values. We do
30303030
* this while holding insert lock to ensure that we won't miss any
30313031
* about-to-commit transactions (UNDO must include all xacts that have
30323032
* commits after REDO point).

‎src/backend/bootstrap/bootparse.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.46 2002/04/27 21:24:33 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.47 2002/06/11 13:40:50 wieck Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -93,7 +93,7 @@ int num_columns_read = 0;
9393
%type<ival>boot_tupleboot_tuplelist
9494
%type<oidval>optoideq
9595

96-
%token<ival>CONSTID
96+
%token<ival>CONST_PID
9797
%tokenOPENXCLOSEXCREATEINSERT_TUPLE
9898
%tokenSTRINGXDEFINE
9999
%tokenXDECLAREINDEXONUSINGXBUILDINDICESUNIQUE
@@ -329,7 +329,7 @@ boot_tuple:
329329
;
330330

331331
boot_const :
332-
CONST { $$=yylval.ival; }
332+
CONST_P { $$=yylval.ival; }
333333
;
334334

335335
boot_ident :

‎src/backend/bootstrap/bootscanner.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.22 2002/04/27 21:24:33 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.23 2002/06/11 13:40:50 wieck Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -121,7 +121,7 @@ insert{ return(INSERT_TUPLE); }
121121
(-)?{D}*"."{D}+({Exp})? |
122122
(-)?{D}+{Exp}{
123123
yylval.ival =EnterString((char*)yytext);
124-
return(CONST);
124+
return(CONST_P);
125125
}
126126

127127
.{

‎src/backend/commands/schemacmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.3 2002/05/17 20:53:33 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.4 2002/06/11 13:40:50 wieck Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -50,7 +50,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
5050
if (!authId)
5151
{
5252
owner_userid=saved_userid;
53-
owner_name=GetUserName(owner_userid);
53+
owner_name=GetUserNameFromId(owner_userid);
5454
}
5555
elseif (superuser())
5656
{
@@ -68,7 +68,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
6868
else/* not superuser */
6969
{
7070
owner_userid=saved_userid;
71-
owner_name=GetUserName(owner_userid);
71+
owner_name=GetUserNameFromId(owner_userid);
7272
if (strcmp(authId,owner_name)!=0)
7373
elog(ERROR,"CREATE SCHEMA: permission denied"
7474
"\n\t\"%s\" is not a superuser, so cannot create a schema for \"%s\"",

‎src/backend/commands/user.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.103 2002/05/21 22:05:54 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.104 2002/06/11 13:40:50 wieck Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -724,7 +724,7 @@ AlterUser(AlterUserStmt *stmt)
724724
createuser<0&&
725725
!validUntil&&
726726
password&&
727-
strcmp(GetUserName(GetUserId()),stmt->user)==0))
727+
strcmp(GetUserNameFromId(GetUserId()),stmt->user)==0))
728728
elog(ERROR,"ALTER USER: permission denied");
729729

730730
/* changes to the flat password file cannot be rolled back */

‎src/backend/commands/variable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.67 2002/05/17 01:19:17 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.68 2002/06/11 13:40:50 wieck Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -583,5 +583,5 @@ assign_session_authorization(const char *value, bool doit, bool interactive)
583583
constchar*
584584
show_session_authorization(void)
585585
{
586-
returnGetUserName(GetSessionUserId());
586+
returnGetUserNameFromId(GetSessionUserId());
587587
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp