2222 *
2323 *
2424 * IDENTIFICATION
25- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.173 2000/10/2218:13:09 pjw Exp $
25+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.174 2000/10/2223:16:55 pjw Exp $
2626 *
2727 * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2828 *
@@ -3883,9 +3883,8 @@ setMaxOid(Archive *fout)
38833883/*
38843884 * findLastBuiltInOid -
38853885 * find the last built in oid
3886- * we do this by looking up the oid of 'template1' in pg_database,
3887- * this is probably not foolproof but comes close
3888- */
3886+ * we do this by retrieving datlastsysoid from the pg_database entry for this database,
3887+ */
38893888
38903889static int
38913890findLastBuiltinOid (const char * dbname )
@@ -3902,21 +3901,21 @@ findLastBuiltinOid(const char* dbname)
39023901if (res == NULL ||
39033902PQresultStatus (res )!= PGRES_TUPLES_OK )
39043903{
3905- fprintf (stderr ,"pg_dump error in finding thetemplate1 database. " );
3904+ fprintf (stderr ,"pg_dump: error in finding thelast system OID " );
39063905fprintf (stderr ,"Explanation from backend: '%s'.\n" ,PQerrorMessage (g_conn ));
39073906exit_nicely (g_conn );
39083907}
39093908ntups = PQntuples (res );
39103909if (ntups < 1 )
39113910{
3912- fprintf (stderr ,"pg_dump: couldn't find thetemplate1 database .\n" );
3913- fprintf (stderr ,"There is no'template1' entry in the 'pg_database' table.\n" );
3911+ fprintf (stderr ,"pg_dump: couldn't find thepg_database entry .\n" );
3912+ fprintf (stderr ,"There is no entry in the 'pg_database' table for this database .\n" );
39143913exit_nicely (g_conn );
39153914}
39163915if (ntups > 1 )
39173916{
3918- fprintf (stderr ,"pg_dump: found more than onetemplate1 database.\n" );
3919- fprintf (stderr ,"There is more than one'template1' entry in the 'pg_database' table\n" );
3917+ fprintf (stderr ,"pg_dump: found more than onematching database.\n" );
3918+ fprintf (stderr ,"There is more than one entry for this database in the 'pg_database' table\n" );
39203919exit_nicely (g_conn );
39213920}
39223921last_oid = atoi (PQgetvalue (res ,0 ,PQfnumber (res ,"datlastsysoid" )));