8989DefineUser (CreateUserStmt * stmt )
9090{
9191
92- char * pg_user ;
92+ char * pg_shadow ;
9393Relation pg_shadow_rel ;
9494TupleDesc pg_shadow_dsc ;
9595HeapScanDesc scan ;
@@ -112,12 +112,12 @@ DefineUser(CreateUserStmt *stmt)
112112 * Make sure the user attempting to create a user can insert into the
113113 * pg_shadow relation.
114114 */
115- pg_user = GetPgUserName ();
116- if (pg_aclcheck (ShadowRelationName ,pg_user ,ACL_RD |ACL_WR |ACL_AP )!= ACLCHECK_OK )
115+ pg_shadow = GetPgUserName ();
116+ if (pg_aclcheck (ShadowRelationName ,pg_shadow ,ACL_RD |ACL_WR |ACL_AP )!= ACLCHECK_OK )
117117{
118118UserAbortTransactionBlock ();
119119elog (ERROR ,"defineUser: user \"%s\" does not have SELECT and INSERT privilege for \"%s\"" ,
120- pg_user ,ShadowRelationName );
120+ pg_shadow ,ShadowRelationName );
121121return ;
122122}
123123
@@ -220,7 +220,7 @@ extern void
220220AlterUser (AlterUserStmt * stmt )
221221{
222222
223- char * pg_user ;
223+ char * pg_shadow ;
224224Relation pg_shadow_rel ;
225225TupleDesc pg_shadow_dsc ;
226226HeapScanDesc scan ;
@@ -242,12 +242,12 @@ AlterUser(AlterUserStmt *stmt)
242242 * Make sure the user attempting to create a user can insert into the
243243 * pg_shadow relation.
244244 */
245- pg_user = GetPgUserName ();
246- if (pg_aclcheck (ShadowRelationName ,pg_user ,ACL_RD |ACL_WR )!= ACLCHECK_OK )
245+ pg_shadow = GetPgUserName ();
246+ if (pg_aclcheck (ShadowRelationName ,pg_shadow ,ACL_RD |ACL_WR )!= ACLCHECK_OK )
247247{
248248UserAbortTransactionBlock ();
249249elog (ERROR ,"alterUser: user \"%s\" does not have SELECT and UPDATE privilege for \"%s\"" ,
250- pg_user ,ShadowRelationName );
250+ pg_shadow ,ShadowRelationName );
251251return ;
252252}
253253
@@ -347,7 +347,7 @@ extern void
347347RemoveUser (char * user )
348348{
349349
350- char * pg_user ;
350+ char * pg_shadow ;
351351Relation pg_shadow_rel ,
352352pg_rel ;
353353TupleDesc pg_dsc ;
@@ -369,12 +369,12 @@ RemoveUser(char *user)
369369 * Make sure the user attempting to create a user can delete from the
370370 * pg_shadow relation.
371371 */
372- pg_user = GetPgUserName ();
373- if (pg_aclcheck (ShadowRelationName ,pg_user ,ACL_RD |ACL_WR )!= ACLCHECK_OK )
372+ pg_shadow = GetPgUserName ();
373+ if (pg_aclcheck (ShadowRelationName ,pg_shadow ,ACL_RD |ACL_WR )!= ACLCHECK_OK )
374374{
375375UserAbortTransactionBlock ();
376376elog (ERROR ,"removeUser: user \"%s\" does not have SELECT and DELETE privilege for \"%s\"" ,
377- pg_user ,ShadowRelationName );
377+ pg_shadow ,ShadowRelationName );
378378return ;
379379}
380380
@@ -463,7 +463,7 @@ RemoveUser(char *user)
463463 * tables, views, etc owned by the user.
464464 *
465465 * The second option would be to create a means of deleting tables, view,
466- * etc. owned by the user from other databases.Pg_user is global and
466+ * etc. owned by the user from other databases.pg_shadow is global and
467467 * so this must be done at some point.
468468 *
469469 * Let us not forget that the user should be removed from the pg_groups