projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf333a5
)
dumpUserConfig failed (in a pretty harmless way, but failed nonetheless)
author
Tom Lane
<tgl@sss.pgh.pa.us>
Sun, 28 Aug 2005 16:31:37 +0000
(16:31 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Sun, 28 Aug 2005 16:31:37 +0000
(16:31 +0000)
to cope with a group name when dumping from a pre-8.1 installation.
Per report from Stefan Kaltenbrunner.
src/bin/pg_dump/pg_dumpall.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_dump/pg_dumpall.c
b/src/bin/pg_dump/pg_dumpall.c
index 431100850bcdbba560792c249f7777e659fc2312..de26e8ecb43bbc024acf7c98030ed62be5bfbf63 100644
(file)
--- a/
src/bin/pg_dump/pg_dumpall.c
+++ b/
src/bin/pg_dump/pg_dumpall.c
@@
-928,10
+928,10
@@
dumpUserConfig(PGconn *conn, const char *username)
else
printfPQExpBuffer(buf, "SELECT useconfig[%d] FROM pg_shadow WHERE usename = ", count);
appendStringLiteral(buf, username, true);
- appendPQExpBuffer(buf, ";");
res = executeQuery(conn, buf->data);
- if (!PQgetisnull(res, 0, 0))
+ if (PQntuples(res) == 1 &&
+ !PQgetisnull(res, 0, 0))
{
makeAlterConfigCommand(PQgetvalue(res, 0, 0), "ROLE", username);
PQclear(res);