Fix a bug

This commit is contained in:
antao 2018-11-11 12:16:26 +08:00
parent fe877ef265
commit 9d81f3217d
1 changed files with 2 additions and 1 deletions

View File

@ -154,6 +154,7 @@ void create_model::createModelClassFromPG(const std::string &path, PgClient &cli
std::cerr << e.base().what() << std::endl;
exit(1);
};
size_t pkNumber = 0;
client << "SELECT \
pg_constraint.conname AS pk_name,\
@ -224,7 +225,7 @@ void create_model::createModelClassFromPG(const std::string &path, PgClient &cli
AND pg_attribute.attnum = pg_constraint.conkey [ $1 ] \
INNER JOIN pg_type ON pg_type.oid = pg_attribute.atttypid \
WHERE pg_class.relname = $2 and pg_constraint.contype='p'"
<< i
<< (int)i
<< tableName
<< Mode::Blocking >>
[&](bool isNull, std::string colName, const std::string &type) {