Index: doc/src/sgml/backup.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/backup.sgml,v retrieving revision 2.65 diff -u -r2.65 backup.sgml --- doc/src/sgml/backup.sgml 19 Apr 2005 01:39:50 -0000 2.65 +++ doc/src/sgml/backup.sgml 20 Jun 2005 10:28:21 -0000 @@ -177,11 +177,11 @@ The resulting dump can be restored with psql: -psql -f infile template1 +psql -f infile postgres (Actually, you can specify any existing database name to start from, - but if you are reloading in an empty cluster then template1 - is the only available choice.) It is always necessary to have + but if you are reloading in an empty cluster then postgres + should generally be used.) It is always necessary to have database superuser access when restoring a pg_dumpall dump, as that is required to restore the user and group information. @@ -1223,7 +1223,7 @@ in parallel, on different ports. Then you can use something like -pg_dumpall -p 5432 | psql -d template1 -p 6543 +pg_dumpall -p 5432 | psql -d postgres -p 6543 to transfer your data. Or use an intermediate file if you want. @@ -1256,7 +1256,7 @@ gmake install initdb -D /usr/local/pgsql/data postmaster -D /usr/local/pgsql/data -psql -f backup template1 +psql -f backup postgres See about ways to start and stop the Index: doc/src/sgml/charset.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/charset.sgml,v retrieving revision 2.72 diff -u -r2.72 charset.sgml --- doc/src/sgml/charset.sgml 16 Apr 2005 16:50:01 -0000 2.72 +++ doc/src/sgml/charset.sgml 20 Jun 2005 10:29:32 -0000 @@ -647,6 +647,7 @@ euc_kr | t-ishii | EUC_KR euc_tw | t-ishii | EUC_TW mule_internal | t-ishii | MULE_INTERNAL + postgres | t-ishii | EUC_JP regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP Index: doc/src/sgml/client-auth.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v retrieving revision 1.80 diff -u -r1.80 client-auth.sgml --- doc/src/sgml/client-auth.sgml 4 Jun 2005 20:42:41 -0000 1.80 +++ doc/src/sgml/client-auth.sgml 20 Jun 2005 10:30:55 -0000 @@ -452,17 +452,17 @@ host all all 127.0.0.1 255.255.255.255 trust # Allow any user from any host with IP address 192.168.93.x to connect -# to database "template1" as the same user name that ident reports for +# to database "postgres" as the same user name that ident reports for # the connection (typically the Unix user name). # # TYPE DATABASE USER CIDR-ADDRESS METHOD -host template1 all 192.168.93.0/24 ident sameuser +host postgres all 192.168.93.0/24 ident sameuser # Allow a user from host 192.168.12.10 to connect to database -# "template1" if the user's password is correctly supplied. +# "postgres" if the user's password is correctly supplied. # # TYPE DATABASE USER CIDR-ADDRESS METHOD -host template1 all 192.168.12.10/32 md5 +host postgres all 192.168.12.10/32 md5 # In the absence of preceding "host" lines, these two lines will # reject all connection from 192.168.54.1 (since that entry will be Index: doc/src/sgml/installation.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/installation.sgml,v retrieving revision 1.235 diff -u -r1.235 installation.sgml --- doc/src/sgml/installation.sgml 12 Jun 2005 15:51:50 -0000 1.235 +++ doc/src/sgml/installation.sgml 20 Jun 2005 10:31:39 -0000 @@ -468,7 +468,7 @@ Finally, restore your data with -/usr/local/pgsql/bin/psql -d template1 -f outputfile +/usr/local/pgsql/bin/psql -d postgres -f outputfile using the new psql. Index: doc/src/sgml/libpq.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/libpq.sgml,v retrieving revision 1.185 diff -u -r1.185 libpq.sgml --- doc/src/sgml/libpq.sgml 12 Jun 2005 00:00:20 -0000 1.185 +++ doc/src/sgml/libpq.sgml 20 Jun 2005 10:32:50 -0000 @@ -4230,14 +4230,14 @@ /* * If the user supplies a parameter on the command line, use it as - * the conninfo string; otherwise default to setting dbname=template1 + * the 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); @@ -4376,14 +4376,14 @@ /* * If the user supplies a parameter on the command line, use it as - * the conninfo string; otherwise default to setting dbname=template1 + * the 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); @@ -4518,14 +4518,14 @@ /* * If the user supplies a parameter on the command line, use it as - * the conninfo string; otherwise default to setting dbname=template1 + * the 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); Index: doc/src/sgml/manage-ag.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v retrieving revision 2.41 diff -u -r2.41 manage-ag.sgml --- doc/src/sgml/manage-ag.sgml 13 Jun 2005 02:40:04 -0000 2.41 +++ doc/src/sgml/manage-ag.sgml 20 Jun 2005 15:12:11 -0000 @@ -112,15 +112,14 @@ site can be created. The first database is always created by the initdb command when the data storage area is initialized. (See .) This - database is called - template1.template1 So to + database is called postgres. So to create the first real database you can connect to - template1. + postgres. - The name template1 is no accident: when a new - database is created, the template database is essentially cloned. + A second database, template1 is also created: + when a new database is created, the template database is essentially cloned. This means that any changes you make in template1 are propagated to all subsequently created databases. This implies that you should not use the template database for real work, but when @@ -137,7 +136,7 @@ createdb dbname - createdb does no magic. It connects to the template1 + createdb does no magic. It connects to the postgres database and issues the CREATE DATABASE command, exactly as described above. The reference page contains the invocation @@ -268,12 +267,32 @@ template1 and template0 do not have any special status beyond the fact that the name template1 is the default - source database name for CREATE DATABASE and the default - database-to-connect-to for various programs such as createdb. + source database name for CREATE DATABASE. For example, one could drop template1 and recreate it from template0 without any ill effects. This course of action might be advisable if one has carelessly added a bunch of junk in - template1. + template1. + + + + The postgres database is provided as a default database for + users and applications to connect to. It is simply a copy of template1 + and may be dropped (and recreated) if required e.g. + +postgres@zankou:~$ psql template1 +Welcome to psql 8.1.0, the PostgreSQL interactive terminal. + +Type: \copyright for distribution terms + \h for help with SQL commands + \? for help with psql commands + \g or terminate with semicolon to execute query + \q to quit + +template1=# DROP DATABASE postgres; +DROP DATABASE +template1=# CREATE DATABASE postgres; +CREATE DATABASE + Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.329 diff -u -r1.329 runtime.sgml --- doc/src/sgml/runtime.sgml 17 Jun 2005 22:32:42 -0000 1.329 +++ doc/src/sgml/runtime.sgml 20 Jun 2005 15:19:34 -0000 @@ -58,7 +58,9 @@ template1. As the name suggests, this will be used as a template for subsequently created databases; it should not be used for actual work. (See for - information about creating new databases within a cluster.) + information about creating new databases within a cluster). Another + database called postgres is also created for use + by utilities, users and third party applications. @@ -5319,7 +5321,7 @@ to connect to. In order to connect to the database server using this tunnel, you connect to port 3333 on the local machine: -psql -h localhost -p 3333 template1 +psql -h localhost -p 3333 postgres To the database server it will then look as though you are really user joe@foo.com and it will use whatever Index: doc/src/sgml/start.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/start.sgml,v retrieving revision 1.38 diff -u -r1.38 start.sgml --- doc/src/sgml/start.sgml 8 Jan 2005 01:44:08 -0000 1.38 +++ doc/src/sgml/start.sgml 20 Jun 2005 15:20:14 -0000 @@ -183,7 +183,7 @@ Another response could be this: -createdb: could not connect to database template1: could not connect to server: +createdb: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? @@ -196,7 +196,7 @@ Another response could be this: -createdb: could not connect to database template1: FATAL: user "joe" does not +createdb: could not connect to database postgres: FATAL: user "joe" does not exist where your own login name is mentioned. This will happen if the Index: doc/src/sgml/ref/createlang.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v retrieving revision 1.34 diff -u -r1.34 createlang.sgml --- doc/src/sgml/ref/createlang.sgml 29 May 2005 03:32:18 -0000 1.34 +++ doc/src/sgml/ref/createlang.sgml 20 Jun 2005 11:45:32 -0000 @@ -219,9 +219,9 @@ To install the language pltcl into the database - template1: + postgres: -$ createlang pltcl template1 +$ createlang pltcl postgres Index: doc/src/sgml/ref/drop_database.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v retrieving revision 1.19 diff -u -r1.19 drop_database.sgml --- doc/src/sgml/ref/drop_database.sgml 29 Nov 2003 19:51:38 -0000 1.19 +++ doc/src/sgml/ref/drop_database.sgml 20 Jun 2005 11:47:31 -0000 @@ -32,7 +32,7 @@ catalog entries for the database and deletes the directory containing the data. It can only be executed by the database owner. Also, it cannot be executed while you or anyone else are connected - to the target database. (Connect to template1 or any + to the target database. (Connect to postgres or any other database to issue this command.) Index: doc/src/sgml/ref/initdb.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v retrieving revision 1.34 diff -u -r1.34 initdb.sgml --- doc/src/sgml/ref/initdb.sgml 22 Feb 2005 02:54:19 -0000 1.34 +++ doc/src/sgml/ref/initdb.sgml 20 Jun 2005 15:14:37 -0000 @@ -47,9 +47,11 @@ which the database data will live, generating the shared catalog tables (tables that belong to the whole cluster rather than to any particular database), and creating the template1 - database. When you later create a new database, everything in the - template1 database is copied. It contains catalog - tables containing things like built-in data types. + and postgres databases. When you later create a + new database, everything in the template1 database is + copied. It contains catalog tables containing things like built-in data + types. The postgres database is a default database + for use by users, utilities and third party applications. Index: doc/src/sgml/ref/pg_dumpall.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v retrieving revision 1.49 diff -u -r1.49 pg_dumpall.sgml --- doc/src/sgml/ref/pg_dumpall.sgml 29 May 2005 03:32:18 -0000 1.49 +++ doc/src/sgml/ref/pg_dumpall.sgml 20 Jun 2005 11:51:47 -0000 @@ -401,7 +401,7 @@ To reload this database use, for example: -$ psql -f db.out template1 +$ psql -f db.out postgres (It is not important to which database you connect here since the script file created by pg_dumpall will Index: src/bin/initdb/initdb.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/initdb/initdb.c,v retrieving revision 1.84 diff -u -r1.84 initdb.c --- src/bin/initdb/initdb.c 17 Jun 2005 22:32:47 -0000 1.84 +++ src/bin/initdb/initdb.c 20 Jun 2005 14:42:28 -0000 @@ -23,7 +23,8 @@ * just embedded into this program (yeah, it's ugly), but larger chunks * are taken from script files. * - * template0 is made just by copying the completed template1. + * template0 and the default database, postgres, are made just by copying + * the completed template1. * * Note: * The program has some memory leakage - it isn't worth cleaning it up. @@ -177,6 +178,7 @@ static void set_info_version(void); static void setup_schema(void); static void vacuum_db(void); +static void make_postgres(void); static void make_template0(void); static void trapsig(int signum); static void check_ok(void); @@ -1828,6 +1830,37 @@ } /* + * copy template1 to postgres + */ +static void +make_postgres(void) +{ + PG_CMD_DECL; + char **line; + static char *default_setup[] = { + "CREATE DATABASE \"default\";\n", + NULL + }; + + fputs(_("copying template1 to postgres ... "), stdout); + fflush(stdout); + + snprintf(cmd, sizeof(cmd), + "\"%s\" %s template1 >%s", + backend_exec, backend_options, + DEVNULL); + + PG_CMD_OPEN; + + for (line = default_setup; *line; line++) + PG_CMD_PUTS(*line); + + PG_CMD_CLOSE; + + check_ok(); +} + +/* * copy template1 to template0 */ static void @@ -2607,6 +2640,8 @@ vacuum_db(); + make_postgres(); + make_template0(); if (authwarning != NULL) Index: src/bin/pg_ctl/pg_ctl.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/pg_ctl/pg_ctl.c,v retrieving revision 1.57 diff -u -r1.57 pg_ctl.c --- src/bin/pg_ctl/pg_ctl.c 4 May 2005 22:35:15 -0000 1.57 +++ src/bin/pg_ctl/pg_ctl.c 20 Jun 2005 14:43:05 -0000 @@ -442,7 +442,7 @@ for (i = 0; i < wait_seconds; i++) { if ((conn = PQsetdbLogin(NULL, portstr, NULL, NULL, - "template1", NULL, NULL)) != NULL && + "postgres", NULL, NULL)) != NULL && (PQstatus(conn) == CONNECTION_OK || (strcmp(PQerrorMessage(conn), PQnoPasswordSupplied) == 0))) Index: src/bin/pg_dump/pg_dumpall.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v retrieving revision 1.59 diff -u -r1.59 pg_dumpall.c --- src/bin/pg_dump/pg_dumpall.c 18 Apr 2005 23:47:52 -0000 1.59 +++ src/bin/pg_dump/pg_dumpall.c 20 Jun 2005 14:48:03 -0000 @@ -297,13 +297,13 @@ } - conn = connectDatabase("template1", pghost, pgport, pguser, force_password); + conn = connectDatabase("postgres", pghost, pgport, pguser, force_password); printf("--\n-- PostgreSQL database cluster dump\n--\n\n"); if (verbose) dumpTimestamp("Started on"); - printf("\\connect \"template1\"\n\n"); + printf("\\connect \"postgres\"\n\n"); if (!data_only) { @@ -663,6 +663,9 @@ if (strcmp(dbname, "template1") == 0) continue; + + if (server_version >= 80100 && strcmp(dbname, "postgres") == 0) + continue; buf = createPQExpBuffer(); Index: src/bin/psql/startup.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/psql/startup.c,v retrieving revision 1.117 diff -u -r1.117 startup.c --- src/bin/psql/startup.c 14 Jun 2005 02:57:41 -0000 1.117 +++ src/bin/psql/startup.c 20 Jun 2005 14:49:31 -0000 @@ -195,7 +195,7 @@ { need_pass = false; pset.db = PQsetdbLogin(options.host, options.port, NULL, NULL, - options.action == ACT_LIST_DB ? "template1" : options.dbname, + options.action == ACT_LIST_DB ? "postgres" : options.dbname, username, password); if (PQstatus(pset.db) == CONNECTION_BAD && Index: src/bin/scripts/clusterdb.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/scripts/clusterdb.c,v retrieving revision 1.12 diff -u -r1.12 clusterdb.c --- src/bin/scripts/clusterdb.c 1 Jan 2005 05:43:08 -0000 1.12 +++ src/bin/scripts/clusterdb.c 20 Jun 2005 14:50:06 -0000 @@ -207,7 +207,7 @@ PGresult *result; int i; - conn = connectDatabase("template1", host, port, username, password, progname); + conn = connectDatabase("postgres", host, port, username, password, progname); result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn;", progname, echo); PQfinish(conn); Index: src/bin/scripts/createdb.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/scripts/createdb.c,v retrieving revision 1.14 diff -u -r1.14 createdb.c --- src/bin/scripts/createdb.c 31 Dec 2004 22:03:17 -0000 1.14 +++ src/bin/scripts/createdb.c 20 Jun 2005 14:50:40 -0000 @@ -157,7 +157,7 @@ appendPQExpBuffer(&sql, " TEMPLATE %s", fmtId(template)); appendPQExpBuffer(&sql, ";\n"); - conn = connectDatabase("template1", host, port, username, password, progname); + conn = connectDatabase("postgres", host, port, username, password, progname); if (echo) printf("%s", sql.data); Index: src/bin/scripts/createuser.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/scripts/createuser.c,v retrieving revision 1.16 diff -u -r1.16 createuser.c --- src/bin/scripts/createuser.c 31 Dec 2004 22:03:17 -0000 1.16 +++ src/bin/scripts/createuser.c 20 Jun 2005 14:51:28 -0000 @@ -209,7 +209,7 @@ appendPQExpBuffer(&sql, " NOCREATEUSER"); appendPQExpBuffer(&sql, ";\n"); - conn = connectDatabase("template1", host, port, username, password, progname); + conn = connectDatabase("postgres", host, port, username, password, progname); if (echo) printf("%s", sql.data); Index: src/bin/scripts/dropdb.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/scripts/dropdb.c,v retrieving revision 1.14 diff -u -r1.14 dropdb.c --- src/bin/scripts/dropdb.c 31 Dec 2004 22:03:17 -0000 1.14 +++ src/bin/scripts/dropdb.c 20 Jun 2005 14:51:43 -0000 @@ -117,7 +117,7 @@ appendPQExpBuffer(&sql, "DROP DATABASE %s;\n", fmtId(dbname)); - conn = connectDatabase("template1", host, port, username, password, progname); + conn = connectDatabase("postgres", host, port, username, password, progname); if (echo) printf("%s", sql.data); Index: src/bin/scripts/dropuser.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/scripts/dropuser.c,v retrieving revision 1.13 diff -u -r1.13 dropuser.c --- src/bin/scripts/dropuser.c 31 Dec 2004 22:03:17 -0000 1.13 +++ src/bin/scripts/dropuser.c 20 Jun 2005 14:52:08 -0000 @@ -116,7 +116,7 @@ initPQExpBuffer(&sql); appendPQExpBuffer(&sql, "DROP USER %s;\n", fmtId(dropuser)); - conn = connectDatabase("template1", host, port, username, password, progname); + conn = connectDatabase("postgres", host, port, username, password, progname); if (echo) printf("%s", sql.data); Index: src/bin/scripts/vacuumdb.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/scripts/vacuumdb.c,v retrieving revision 1.12 diff -u -r1.12 vacuumdb.c --- src/bin/scripts/vacuumdb.c 31 Dec 2004 22:03:17 -0000 1.12 +++ src/bin/scripts/vacuumdb.c 20 Jun 2005 14:52:38 -0000 @@ -233,7 +233,7 @@ PGresult *result; int i; - conn = connectDatabase("template1", host, port, username, password, progname); + conn = connectDatabase("postgres", host, port, username, password, progname); result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn;", progname, echo); PQfinish(conn); Index: src/interfaces/ecpg/test/testdynalloc.pgc =================================================================== RCS file: /projects/cvsroot/pgsql/src/interfaces/ecpg/test/testdynalloc.pgc,v retrieving revision 1.1 diff -u -r1.1 testdynalloc.pgc --- src/interfaces/ecpg/test/testdynalloc.pgc 16 Nov 2001 08:36:37 -0000 1.1 +++ src/interfaces/ecpg/test/testdynalloc.pgc 20 Jun 2005 09:23:55 -0000 @@ -13,7 +13,7 @@ if (getenv("SQLOPT")) ECPGdebug(1,stderr); exec sql whenever sqlerror do sqlprint(); - exec sql connect to template1; + exec sql connect to postgres; exec sql allocate descriptor mydesc; exec sql select tablename into descriptor mydesc from pg_tables; Index: src/interfaces/libpq/pg_service.conf.sample =================================================================== RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/pg_service.conf.sample,v retrieving revision 1.2 diff -u -r1.2 pg_service.conf.sample --- src/interfaces/libpq/pg_service.conf.sample 19 Dec 2003 21:50:54 -0000 1.2 +++ src/interfaces/libpq/pg_service.conf.sample 20 Jun 2005 09:24:52 -0000 @@ -4,13 +4,13 @@ # A service is a set of named connection parameters. You may specify # multiple services in this file. Each starts with a service name in # brackets. Subsequent lines have connection configuration parameters of -# the pattern "param=value". A sample configuration for template1 is +# the pattern "param=value". A sample configuration for postgres is # included in this file. Lines beginning with '#' are comments. # # Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and # rename it pg_service.conf. # # -#[template1] -#dbname=template1 +#[postgres] +#dbname=postgres #user=postgres Index: src/test/bench/create.sh =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/bench/create.sh,v retrieving revision 1.4 diff -u -r1.4 create.sh --- src/test/bench/create.sh 1 Sep 2004 17:25:40 -0000 1.4 +++ src/test/bench/create.sh 20 Jun 2005 14:53:11 -0000 @@ -10,10 +10,10 @@ fi echo =============== destroying old bench database... ================= -echo "drop database bench" | postgres -D${1} template1 > /dev/null +echo "drop database bench" | postgres -D${1} postgres > /dev/null echo =============== creating new bench database... ================= -echo "create database bench" | postgres -D${1} template1 > /dev/null +echo "create database bench" | postgres -D${1} postgres > /dev/null if [ $? -ne 0 ]; then echo createdb failed exit 1 Index: src/test/examples/testlibpq.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/examples/testlibpq.c,v retrieving revision 1.14 diff -u -r1.14 testlibpq.c --- src/test/examples/testlibpq.c 1 Oct 2004 17:34:19 -0000 1.14 +++ src/test/examples/testlibpq.c 20 Jun 2005 09:26:39 -0000 @@ -26,14 +26,14 @@ /* * 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); Index: src/test/examples/testlibpq2.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/examples/testlibpq2.c,v retrieving revision 1.11 diff -u -r1.11 testlibpq2.c --- src/test/examples/testlibpq2.c 1 Oct 2004 17:34:19 -0000 1.11 +++ src/test/examples/testlibpq2.c 20 Jun 2005 09:27:07 -0000 @@ -46,14 +46,14 @@ /* * 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); Index: src/test/examples/testlibpq3.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/examples/testlibpq3.c,v retrieving revision 1.10 diff -u -r1.10 testlibpq3.c --- src/test/examples/testlibpq3.c 1 Oct 2004 17:34:19 -0000 1.10 +++ src/test/examples/testlibpq3.c 20 Jun 2005 09:27:31 -0000 @@ -51,14 +51,14 @@ /* * 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); Index: src/test/regress/pg_regress.sh =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/pg_regress.sh,v retrieving revision 1.56 diff -u -r1.56 pg_regress.sh --- src/test/regress/pg_regress.sh 20 Jun 2005 02:26:50 -0000 1.56 +++ src/test/regress/pg_regress.sh 20 Jun 2005 14:53:43 -0000 @@ -441,7 +441,7 @@ # wait forever, however. i=0 max=60 - until "$bindir/psql" -X $psql_options template1 /dev/null + until "$bindir/psql" -X $psql_options postgres /dev/null do i=`expr $i + 1` if [ $i -ge $max ]