diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-21 04:02:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-21 04:02:34 +0000 |
commit | 6f7fc0badef55b376f408bd318a8065fd2edf266 (patch) | |
tree | b86da563c6c8de5c930f00e8f2a7d5a994ba2d18 /src/test/examples/testlibpq.c | |
parent | ec3a1af0a89a169c100f7157f7c6932234ae5988 (diff) | |
download | postgresql-6f7fc0badef55b376f408bd318a8065fd2edf266.tar.gz postgresql-6f7fc0badef55b376f408bd318a8065fd2edf266.zip |
Cause initdb to create a third standard database "postgres", which
unlike template0 and template1 does not have any special status in
terms of backend functionality. However, all external utilities such
as createuser and createdb now connect to "postgres" instead of
template1, and the documentation is changed to encourage people to use
"postgres" instead of template1 as a play area. This should fix some
longstanding gotchas involving unexpected propagation of database
objects by createdb (when you used template1 without understanding
the implications), as well as ameliorating the problem that CREATE
DATABASE is unhappy if anyone else is connected to template1.
Patch by Dave Page, minor editing by Tom Lane. All per recent
pghackers discussions.
Diffstat (limited to 'src/test/examples/testlibpq.c')
-rw-r--r-- | src/test/examples/testlibpq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/examples/testlibpq.c b/src/test/examples/testlibpq.c index b9d396a2dcb..3295076481e 100644 --- a/src/test/examples/testlibpq.c +++ b/src/test/examples/testlibpq.c @@ -26,14 +26,14 @@ main(int argc, char **argv) /* * If the user supplies a parameter on the command line, use it as the - * conninfo string; otherwise default to setting dbname=template1 and + * conninfo string; otherwise default to setting dbname=postgres and * using environment variables or defaults for all other connection * parameters. */ if (argc > 1) conninfo = argv[1]; else - conninfo = "dbname = template1"; + conninfo = "dbname = postgres"; /* Make a connection to the database */ conn = PQconnectdb(conninfo); |