1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

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.
This commit is contained in:
Tom Lane
2003-07-29 14:17:37 +00:00
parent a5e804df71
commit f353f8e83b

View File

@ -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')");