While updating opennms database 1.10.10 to 1.12.5 with
I received two errors:
1) opennms tries to bind variable to table name in ALTER TABLE .. OWNER TO statement, which fails with PostgreSQL JDBC driver
2) opennms tries to alter nonexisting table (ALTER TABLE daily_series OWNER TO opennms)
Attached patch fixes these issues.