Few errors in install and upgrade (pgsql)

Signed-off-by: emanuele <emanuele45@gmail.com>
Some other errors on keys and auto_increemnt

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #958 from emanuele45/pgsql_errors

Few errors in install and upgrade (pgsql)