diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-05 23:12:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-05 23:12:09 +0000 |
commit | 40f64064ff56c3118d156ba83df72b1779415a8a (patch) | |
tree | d318bf6c8e6e85a15d2cd6e997ee02bf233dd181 /src/backend/commands/user.c | |
parent | 282713a836d5dfe3dcefeaa6a6cedf5f000bdb09 (diff) |
Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 17 |
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' : ' '; } |