Downgrade ERROR to WARNING in the case where a table does not have a primary key or not-null unique key.
We want to be able to keep processing further tables if we encounter this problem on one of many --tables.
This commit is contained in:
parent
f6ca290fb2
commit
66ae2f33a7
@ -472,10 +472,12 @@ repack_one_database(const char *orderby, char *errbuf, size_t errsize)
|
||||
table.pkid = getoid(res, i, c++);
|
||||
table.ckid = getoid(res, i, c++);
|
||||
|
||||
if (table.pkid == 0)
|
||||
ereport(ERROR,
|
||||
(errcode(E_PG_COMMAND),
|
||||
errmsg("relation \"%s\" must have a primary key or not-null unique keys", table.target_name)));
|
||||
if (table.pkid == 0) {
|
||||
ereport(WARNING,
|
||||
(errcode(E_PG_COMMAND),
|
||||
errmsg("relation \"%s\" must have a primary key or not-null unique keys", table.target_name)));
|
||||
continue;
|
||||
}
|
||||
|
||||
table.create_pktype = getstr(res, i, c++);
|
||||
table.create_log = getstr(res, i, c++);
|
||||
|
Loading…
x
Reference in New Issue
Block a user