Skip to content

Commit 3e99158

Browse files
Jan WieckJan Wieck
authored andcommitted
update_pg_pwd() is an AR trigger. Corrected return type.
Jan
1 parent b57b0e0 commit 3e99158

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/backend/commands/user.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: user.c,v 1.46 1999/12/20 01:11:37 tgl Exp $
8+
* $Id: user.c,v 1.47 1999/12/21 22:39:01 wieck Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -24,6 +24,7 @@
2424
#include "catalog/indexing.h"
2525
#include "commands/copy.h"
2626
#include "commands/user.h"
27+
#include "commands/trigger.h"
2728
#include "libpq/crypt.h"
2829
#include "miscadmin.h"
2930
#include "nodes/pg_list.h"
@@ -48,13 +49,20 @@ static void CheckPgUserAclNotNull(void);
4849
*---------------------------------------------------------------------
4950
*/
5051

51-
void
52+
HeapTuple
5253
update_pg_pwd(void)
5354
{
5455
char *filename,
5556
*tempname;
5657
int bufsize;
5758

59+
60+
/*
61+
* This is a trigger, so clean out the information provided by
62+
* the trigger manager.
63+
*/
64+
CurrentTriggerData = NULL;
65+
5866
/*
5967
* Create a temporary filename to be renamed later. This prevents the
6068
* backend from clobbering the pg_pwd file while the postmaster might
@@ -93,6 +101,8 @@ update_pg_pwd(void)
93101
creat(filename, S_IRUSR | S_IWUSR);
94102

95103
pfree((void *) tempname);
104+
105+
return NULL;
96106
}
97107

98108
/*---------------------------------------------------------------------

src/include/commands/user.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ extern void CreateGroup(CreateGroupStmt *stmt, CommandDest dest);
2121
extern void AlterGroup(AlterGroupStmt *stmt, CommandDest dest);
2222
extern void DropGroup(DropGroupStmt *stmt, CommandDest dest);
2323

24-
extern void update_pg_pwd(void);
24+
extern HeapTuple update_pg_pwd(void);
2525

2626
#endif /* USER_H */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy