diff options
author | Stephen Frost | 2016-05-06 20:15:52 +0000 |
---|---|---|
committer | Stephen Frost | 2016-05-06 20:15:52 +0000 |
commit | c778e27e13e883fb759f6100727aba80102933bd (patch) | |
tree | 6854b1a65a26ee5e5fdb98e001d6b802aedeca7d | |
parent | eccfeeb631fa44850b644661d8b2ce94d9ef4fc1 (diff) |
Correct query in pg_dumpall:dumpRoles
We need to use a new branch due to the 9.5 addition of bypassrls
when adding in the clause to exclude pg_* roles from being dumped
by pg_dumpall.
Pointed out by Noah, patch by me.
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 02fa6990562..694bd1eeaf4 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -676,6 +676,16 @@ dumpRoles(PGconn *conn) "FROM pg_authid " "WHERE rolname !~ '^pg_' " "ORDER BY 2"); + else if (server_version >= 90500) + printfPQExpBuffer(buf, + "SELECT oid, rolname, rolsuper, rolinherit, " + "rolcreaterole, rolcreatedb, " + "rolcanlogin, rolconnlimit, rolpassword, " + "rolvaliduntil, rolreplication, rolbypassrls, " + "pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment, " + "rolname = current_user AS is_current_user " + "FROM pg_authid " + "ORDER BY 2"); else if (server_version >= 90100) printfPQExpBuffer(buf, "SELECT oid, rolname, rolsuper, rolinherit, " |