update_pg_pwd() is an AR trigger. Corrected return type.
Jan
This commit is contained in:
parent
b57b0e0445
commit
3e99158548
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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 "catalog/indexing.h"
|
||||||
#include "commands/copy.h"
|
#include "commands/copy.h"
|
||||||
#include "commands/user.h"
|
#include "commands/user.h"
|
||||||
|
#include "commands/trigger.h"
|
||||||
#include "libpq/crypt.h"
|
#include "libpq/crypt.h"
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
#include "nodes/pg_list.h"
|
#include "nodes/pg_list.h"
|
||||||
@ -48,13 +49,20 @@ static void CheckPgUserAclNotNull(void);
|
|||||||
*---------------------------------------------------------------------
|
*---------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
HeapTuple
|
||||||
update_pg_pwd(void)
|
update_pg_pwd(void)
|
||||||
{
|
{
|
||||||
char *filename,
|
char *filename,
|
||||||
*tempname;
|
*tempname;
|
||||||
int bufsize;
|
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
|
* Create a temporary filename to be renamed later. This prevents the
|
||||||
* backend from clobbering the pg_pwd file while the postmaster might
|
* 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);
|
creat(filename, S_IRUSR | S_IWUSR);
|
||||||
|
|
||||||
pfree((void *) tempname);
|
pfree((void *) tempname);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
|
@ -21,6 +21,6 @@ extern void CreateGroup(CreateGroupStmt *stmt, CommandDest dest);
|
|||||||
extern void AlterGroup(AlterGroupStmt *stmt, CommandDest dest);
|
extern void AlterGroup(AlterGroupStmt *stmt, CommandDest dest);
|
||||||
extern void DropGroup(DropGroupStmt *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 */
|
#endif /* USER_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user