aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>1999-12-21 22:39:02 +0000
committerJan Wieck <JanWieck@Yahoo.com>1999-12-21 22:39:02 +0000
commit3e991585487ab58b77d24298467a2b170f61b4ed (patch)
treef5d4703ca4196accada6fdf92a130d7baf1adcd1 /src
parentb57b0e044538990550b7169f8489624e73f98ca1 (diff)
downloadpostgresql-3e991585487ab58b77d24298467a2b170f61b4ed.tar.gz
postgresql-3e991585487ab58b77d24298467a2b170f61b4ed.zip
update_pg_pwd() is an AR trigger. Corrected return type.
Jan
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/user.c14
-rw-r--r--src/include/commands/user.h2
2 files changed, 13 insertions, 3 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 056d3458381..bb18cad4aff 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: user.c,v 1.46 1999/12/20 01:11:37 tgl Exp $
+ * $Id: user.c,v 1.47 1999/12/21 22:39:01 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,6 +24,7 @@
#include "catalog/indexing.h"
#include "commands/copy.h"
#include "commands/user.h"
+#include "commands/trigger.h"
#include "libpq/crypt.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -48,13 +49,20 @@ static void CheckPgUserAclNotNull(void);
*---------------------------------------------------------------------
*/
-void
+HeapTuple
update_pg_pwd(void)
{
char *filename,
*tempname;
int bufsize;
+
+ /*
+ * This is a trigger, so clean out the information provided by
+ * the trigger manager.
+ */
+ CurrentTriggerData = NULL;
+
/*
* Create a temporary filename to be renamed later. This prevents the
* backend from clobbering the pg_pwd file while the postmaster might
@@ -93,6 +101,8 @@ update_pg_pwd(void)
creat(filename, S_IRUSR | S_IWUSR);
pfree((void *) tempname);
+
+ return NULL;
}
/*---------------------------------------------------------------------
diff --git a/src/include/commands/user.h b/src/include/commands/user.h
index 86a094b0859..036f1576820 100644
--- a/src/include/commands/user.h
+++ b/src/include/commands/user.h
@@ -21,6 +21,6 @@ extern void CreateGroup(CreateGroupStmt *stmt, CommandDest dest);
extern void AlterGroup(AlterGroupStmt *stmt, CommandDest dest);
extern void DropGroup(DropGroupStmt *stmt, CommandDest dest);
-extern void update_pg_pwd(void);
+extern HeapTuple update_pg_pwd(void);
#endif /* USER_H */