Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit018eb02

Browse files
committed
Do not DROP default roles in pg_dumpall -c
When pulling the list of roles to drop, exclude roles whose namesbegin with "pg_" (as we do when we are dumping the roles out torecreate them).Also add regression tests to cover pg_dumpall -c and this specificissue.Noticed by Rushabh Lathia. Patch by me.
1 parentf5e7b2f commit018eb02

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,13 @@ dropRoles(PGconn *conn)
605605
inti_rolname;
606606
inti;
607607

608-
if (server_version >=80100)
608+
if (server_version >=90600)
609+
res=executeQuery(conn,
610+
"SELECT rolname "
611+
"FROM pg_authid "
612+
"WHERE rolname !~ '^pg_' "
613+
"ORDER BY 1");
614+
elseif (server_version >=80100)
609615
res=executeQuery(conn,
610616
"SELECT rolname "
611617
"FROM pg_authid "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp