Iuri,
Whether installing the package for the first time, or upgrading from previous versions, basically the process is:
Examine the sql files loaded during install (package-key/sql/postgresql/ for PG) to see how the database should be representing the package, tables created, special keys, relationships, indexes etc.
When installing, load the sql from the sql files manually where there is a difference, such as a table that doesn't exist etc.
When upgrading, also examine the upgrade error to see how the package is represented in the database differently from how it should be. Use the sql files in package-key/sql/postgresql/upgrade for how to handle the changes. If following standard release versions, report any differences as bugs.
To answer your question:
Once the database is in configuration consistent with the sql, point your browser to: /acs-admin/apm/packages-install This installation method is different than the one at /acs-admin/install
install or upgrade the package(s) in question. Be sure to uncheck the sql files to load (since you've already loaded them).
The real complications occur if there's corrupted data somewhere in the core that's triggering the problem.
cheers,
Torben