Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65a2c8f

Browse files
committed
Improve pg_dump template1 error reports.
1 parent5883563 commit65a2c8f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.121 1999/10/1014:42:44 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.122 1999/10/1017:00:26 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -3075,11 +3075,16 @@ findLastBuiltinOid(void)
30753075
exit_nicely(g_conn);
30763076
}
30773077
ntups=PQntuples(res);
3078-
if (ntups!=1)
3078+
if (ntups<1)
30793079
{
30803080
fprintf(stderr,"pg_dump: couldn't find the template1 database.\n");
3081-
fprintf(stderr,"Check the table pg_database for a problem.\n");
3082-
fprintf(stderr,"There should be exactly one 'template1' entry\n");
3081+
fprintf(stderr,"There is no 'template1' entry in the 'pg_database' table.\n");
3082+
exit_nicely(g_conn);
3083+
}
3084+
if (ntups>1)
3085+
{
3086+
fprintf(stderr,"pg_dump: found more than one template1 database.\n");
3087+
fprintf(stderr,"There is more than one 'template1' entry in the 'pg_database' table\n");
30833088
exit_nicely(g_conn);
30843089
}
30853090
last_oid=atoi(PQgetvalue(res,0,PQfnumber(res,"oid")));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp