diff options
| author | Cédric Villemain | 2011-05-13 20:55:39 +0000 |
|---|---|---|
| committer | Cédric Villemain | 2011-05-13 20:55:39 +0000 |
| commit | e0c3b474d5436c7874aef36988f2646bdb890249 (patch) | |
| tree | 49c41d2b8abbd9bae4096643d840859f3a02a08c /src/bin/scripts/dropdb.c | |
| parent | 40cefa392974c73ec20deb3c15fb5111ed7fad17 (diff) | |
| parent | 9bb6d9795253bb521f81c626fea49a704a369ca9 (diff) | |
Merge branch 'master' into analyze_cacheanalyze_cache
Diffstat (limited to 'src/bin/scripts/dropdb.c')
| -rw-r--r-- | src/bin/scripts/dropdb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c index 1cf18fd5d8..48f73ae25e 100644 --- a/src/bin/scripts/dropdb.c +++ b/src/bin/scripts/dropdb.c @@ -113,6 +113,11 @@ main(int argc, char *argv[]) appendPQExpBuffer(&sql, "DROP DATABASE %s;\n", fmtId(dbname)); + /* + * Connect to the 'postgres' database by default, except have + * the 'postgres' user use 'template1' so he can drop the + * 'postgres' database. + */ conn = connectDatabase(strcmp(dbname, "postgres") == 0 ? "template1" : "postgres", host, port, username, prompt_password, progname); |
