From: Thomas G. Lockhart Date: Sun, 27 Apr 1997 19:21:06 +0000 (+0000) Subject: Change mixed-case routines to lower-case if referenced in pg_proc.h X-Git-Tag: REL6_1~231 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d831e9ce19eafed68df28692808119a9701bb77b;p=postgresql Change mixed-case routines to lower-case if referenced in pg_proc.h --- diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index f24a8567fa..acf9297233 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.4 1997/02/14 04:18:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.5 1997/04/27 19:20:37 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -260,10 +260,14 @@ SetDatabaseName(char *name) * * SetPgUserName must be called before InitPostgres, since the setuid() * is done there. + * + * Replace GetPgUserName() with a lower-case version + * to allow use in new case-insensitive SQL (referenced + * in pg_proc.h). Define GetPgUserName() as a macro - tgl 97/04/26 * ---------------- */ char* -GetPgUserName() +getpgusername() { return UserName; } diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 9e3473a0d2..3792a7cf85 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -11,7 +11,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.8 1997/03/25 08:09:59 scrappy Exp $ + * $Id: miscadmin.h,v 1.9 1997/04/27 19:21:06 thomas Exp $ * * NOTES * some of the information in this file will be moved to @@ -109,7 +109,7 @@ extern char *GetDatabasePath(void); extern char *GetDatabaseName(void); extern void SetDatabaseName(char *name); extern void SetDatabasePath(char *path); -extern char *GetPgUserName(void); +extern char *getpgusername(void); extern void SetPgUserName(void); extern Oid GetUserId(void); extern void SetUserId(void); @@ -117,6 +117,8 @@ extern int ValidateBackend(char *path); extern int FindBackend(char *backend, char *argv0); extern int CheckPathAccess(char *path, char *name, int open_mode); +/* lower case version for case-insensitive SQL referenced in pg_proc.h */ +#define GetPgUserName() getpgusername() /***************************************************************************** * pmod.h -- *