|
22 | 22 | * |
23 | 23 | * |
24 | 24 | * IDENTIFICATION |
25 | | - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.241 2002/02/11 00:18:20 tgl Exp $ |
| 25 | + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.242 2002/02/27 20:59:05 tgl Exp $ |
26 | 26 | * |
27 | 27 | *------------------------------------------------------------------------- |
28 | 28 | */ |
@@ -2426,8 +2426,12 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs, const char *tablename) |
2426 | 2426 | n=PQntuples(res2); |
2427 | 2427 | if (n!=1) |
2428 | 2428 | { |
2429 | | -write_msg(NULL,"query to obtain name of primary key of table \"%s\" did not return exactly one result\n", |
2430 | | -tblinfo[i].relname); |
| 2429 | +if (n==0) |
| 2430 | +write_msg(NULL,"query to obtain name of primary key of table \"%s\" returned no rows\n", |
| 2431 | +tblinfo[i].relname); |
| 2432 | +else |
| 2433 | +write_msg(NULL,"query to obtain name of primary key of table \"%s\" returned %d rows\n", |
| 2434 | +tblinfo[i].relname,n); |
2431 | 2435 | exit_nicely(); |
2432 | 2436 | } |
2433 | 2437 |
|
@@ -2573,8 +2577,12 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs, const char *tablename) |
2573 | 2577 | numFuncs=PQntuples(r); |
2574 | 2578 | if (numFuncs!=1) |
2575 | 2579 | { |
2576 | | -write_msg(NULL,"query to obtain procedure name for trigger \"%s\" did not return exactly one result\n", |
2577 | | -tgname); |
| 2580 | +if (numFuncs==0) |
| 2581 | +write_msg(NULL,"query to obtain procedure name for trigger \"%s\" (procedure OID %s) returned no rows\n", |
| 2582 | +tgname,tgfuncoid); |
| 2583 | +else |
| 2584 | +write_msg(NULL,"query to obtain procedure name for trigger \"%s\" (procedure OID %s) returned %d rows\n", |
| 2585 | +tgname,tgfuncoid,numFuncs); |
2578 | 2586 | exit_nicely(); |
2579 | 2587 | } |
2580 | 2588 |
|
@@ -4736,12 +4744,15 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool |
4736 | 4744 | exit_nicely(); |
4737 | 4745 | } |
4738 | 4746 |
|
| 4747 | +/* Disable this check: it fails if sequence has been renamed */ |
| 4748 | +#ifdefNOT_USED |
4739 | 4749 | if (strcmp(PQgetvalue(res,0,0),tbinfo.relname)!=0) |
4740 | 4750 | { |
4741 | 4751 | write_msg(NULL,"query to get data of sequence \"%s\" returned name \"%s\"\n", |
4742 | 4752 | tbinfo.relname,PQgetvalue(res,0,0)); |
4743 | 4753 | exit_nicely(); |
4744 | 4754 | } |
| 4755 | +#endif |
4745 | 4756 |
|
4746 | 4757 | last=PQgetvalue(res,0,1); |
4747 | 4758 | incby=PQgetvalue(res,0,2); |
|