aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r--src/backend/commands/user.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 9bb36311cc8..4698fa850c0 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.62 2000/06/28 03:31:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.63 2000/07/05 23:11:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -121,7 +121,8 @@ write_password_file(Relation rel)
CRYPT_PWD_FILE_SEPSTR
"%s\n",
nameout(DatumGetName(datum_n)),
- null_p ? "" : textout((text *) datum_p),
+ null_p ? "" :
+ DatumGetCString(DirectFunctionCall1(textout, datum_p)),
null_v ? "\\N" :
DatumGetCString(DirectFunctionCall1(nabstimeout, datum_v))
);
@@ -257,7 +258,8 @@ CreateUser(CreateUserStmt *stmt)
new_record[Anum_pg_shadow_usecatupd - 1] = (Datum) (stmt->createuser);
if (stmt->password)
- new_record[Anum_pg_shadow_passwd - 1] = PointerGetDatum(textin(stmt->password));
+ new_record[Anum_pg_shadow_passwd - 1] =
+ DirectFunctionCall1(textin, CStringGetDatum(stmt->password));
if (stmt->validUntil)
new_record[Anum_pg_shadow_valuntil - 1] =
DirectFunctionCall1(nabstimein, CStringGetDatum(stmt->validUntil));
@@ -424,13 +426,15 @@ AlterUser(AlterUserStmt *stmt)
/* password */
if (stmt->password)
{
- new_record[Anum_pg_shadow_passwd - 1] = PointerGetDatum(textin(stmt->password));
+ new_record[Anum_pg_shadow_passwd - 1] =
+ DirectFunctionCall1(textin, CStringGetDatum(stmt->password));
new_record_nulls[Anum_pg_shadow_passwd - 1] = ' ';
}
else
{
/* leave as is */
- new_record[Anum_pg_shadow_passwd - 1] = heap_getattr(tuple, Anum_pg_shadow_passwd, pg_shadow_dsc, &null);
+ new_record[Anum_pg_shadow_passwd - 1] =
+ heap_getattr(tuple, Anum_pg_shadow_passwd, pg_shadow_dsc, &null);
new_record_nulls[Anum_pg_shadow_passwd - 1] = null ? 'n' : ' ';
}
@@ -444,7 +448,8 @@ AlterUser(AlterUserStmt *stmt)
else
{
/* leave as is */
- new_record[Anum_pg_shadow_valuntil - 1] = heap_getattr(tuple, Anum_pg_shadow_valuntil, pg_shadow_dsc, &null);
+ new_record[Anum_pg_shadow_valuntil - 1] =
+ heap_getattr(tuple, Anum_pg_shadow_valuntil, pg_shadow_dsc, &null);
new_record_nulls[Anum_pg_shadow_valuntil - 1] = null ? 'n' : ' ';
}