Commit f353f8e8 authored by Tom Lane's avatar Tom Lane

There is no reason to cast valuntil to timestamp, and a very good

reason not to: it fails for an 'invalid' abstime.  Per bug report
of today's date.
parent a5e804df
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* *
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.23 2003/07/23 08:47:30 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.24 2003/07/29 14:17:37 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -279,13 +279,13 @@ dumpUsers(PGconn *conn) ...@@ -279,13 +279,13 @@ dumpUsers(PGconn *conn)
if (server_version >= 70100) if (server_version >= 70100)
res = executeQuery(conn, res = executeQuery(conn,
"SELECT usename, usesysid, passwd, usecreatedb, " "SELECT usename, usesysid, passwd, usecreatedb, "
"usesuper, CAST(valuntil AS timestamp) " "usesuper, valuntil "
"FROM pg_shadow " "FROM pg_shadow "
"WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template0')"); "WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template0')");
else else
res = executeQuery(conn, res = executeQuery(conn,
"SELECT usename, usesysid, passwd, usecreatedb, " "SELECT usename, usesysid, passwd, usecreatedb, "
"usesuper, CAST(valuntil AS timestamp) " "usesuper, valuntil "
"FROM pg_shadow " "FROM pg_shadow "
"WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template1')"); "WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template1')");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment