Skip to content

Commit d831e9c

Browse files
author
Thomas G. Lockhart
committed
Change mixed-case routines to lower-case if referenced in pg_proc.h
1 parent 812d5c9 commit d831e9c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/backend/utils/init/miscinit.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.4 1997/02/14 04:18:17 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.5 1997/04/27 19:20:37 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -260,10 +260,14 @@ SetDatabaseName(char *name)
260260
*
261261
* SetPgUserName must be called before InitPostgres, since the setuid()
262262
* is done there.
263+
*
264+
* Replace GetPgUserName() with a lower-case version
265+
* to allow use in new case-insensitive SQL (referenced
266+
* in pg_proc.h). Define GetPgUserName() as a macro - tgl 97/04/26
263267
* ----------------
264268
*/
265269
char*
266-
GetPgUserName()
270+
getpgusername()
267271
{
268272
return UserName;
269273
}

src/include/miscadmin.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $Id: miscadmin.h,v 1.8 1997/03/25 08:09:59 scrappy Exp $
14+
* $Id: miscadmin.h,v 1.9 1997/04/27 19:21:06 thomas Exp $
1515
*
1616
* NOTES
1717
* some of the information in this file will be moved to
@@ -109,14 +109,16 @@ extern char *GetDatabasePath(void);
109109
extern char *GetDatabaseName(void);
110110
extern void SetDatabaseName(char *name);
111111
extern void SetDatabasePath(char *path);
112-
extern char *GetPgUserName(void);
112+
extern char *getpgusername(void);
113113
extern void SetPgUserName(void);
114114
extern Oid GetUserId(void);
115115
extern void SetUserId(void);
116116
extern int ValidateBackend(char *path);
117117
extern int FindBackend(char *backend, char *argv0);
118118
extern int CheckPathAccess(char *path, char *name, int open_mode);
119119

120+
/* lower case version for case-insensitive SQL referenced in pg_proc.h */
121+
#define GetPgUserName() getpgusername()
120122

121123
/*****************************************************************************
122124
* pmod.h -- *

0 commit comments

Comments
 (0)