From: Tom Lane Date: Tue, 29 Jul 2003 14:17:37 +0000 (+0000) Subject: There is no reason to cast valuntil to timestamp, and a very good X-Git-Tag: REL9_0_0~14807 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f353f8e83bb447039b437cbaa3895d215da34f82;p=pg-rex%2Fsyncrep.git 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. --- diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index e56f2448fc..a7502a7c14 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -6,7 +6,7 @@ * 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) if (server_version >= 70100) res = executeQuery(conn, "SELECT usename, usesysid, passwd, usecreatedb, " - "usesuper, CAST(valuntil AS timestamp) " + "usesuper, valuntil " "FROM pg_shadow " "WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template0')"); else res = executeQuery(conn, "SELECT usename, usesysid, passwd, usecreatedb, " - "usesuper, CAST(valuntil AS timestamp) " + "usesuper, valuntil " "FROM pg_shadow " "WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template1')");