|
6 | 6 | * Portions Copyright (c) 1994, Regents of the University of California |
7 | 7 | * |
8 | 8 | * |
9 | | - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.66 2005/07/31 17:19:19 tgl Exp $ |
| 9 | + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.67 2005/08/28 16:31:37 tgl Exp $ |
10 | 10 | * |
11 | 11 | *------------------------------------------------------------------------- |
12 | 12 | */ |
@@ -928,10 +928,10 @@ dumpUserConfig(PGconn *conn, const char *username) |
928 | 928 | else |
929 | 929 | printfPQExpBuffer(buf,"SELECT useconfig[%d] FROM pg_shadow WHERE usename = ",count); |
930 | 930 | appendStringLiteral(buf,username, true); |
931 | | -appendPQExpBuffer(buf,";"); |
932 | 931 |
|
933 | 932 | res=executeQuery(conn,buf->data); |
934 | | -if (!PQgetisnull(res,0,0)) |
| 933 | +if (PQntuples(res)==1&& |
| 934 | +!PQgetisnull(res,0,0)) |
935 | 935 | { |
936 | 936 | makeAlterConfigCommand(PQgetvalue(res,0,0),"ROLE",username); |
937 | 937 | PQclear(res); |
|