I wrote: ... > If all goes smooth, this should give us more flexibility in > the DB patches we create going forward. (There'll be more > that we can do with SQL, without resorting to manipulating > the DB from Java during > upgrades.)
It didn't go smoothly, and I'm hoping this isn't a deal-breaker... My patch is not getting applied. The error (stderr from sipxconfig.sh) is: Result: 2 Failed to execute: create or replace function migrate_pregroup_alarm_contacts() returns void as ' declare i integer BUILD FAILED /etc/sipxpbx/database/database.xml:342: The following error occurred while executing this line: /etc/sipxpbx/database/database.xml:1053: The following error occurred while executing this line: /etc/sipxpbx/database/database.xml:1063: org.postgresql.util.PSQLException: ERROR: unterminated quoted string at or near "' declare i integer" My migrate-pregroup-alarm-contacts.sql is attached. I don't see any difference between how I've declared my migrate_pregroup_alarm_contacts() function, versus the PL/pgSQL functions in migrate-2.8.sql. Indeed the same error on occurs with a function copied in from migrate-2.8.sql. (Surely something has changed, and likely migrate-2.8.sql would have the same failure now too.) When I feed this same patch into psql from the command-line, there is no problem. So it really seems something about how org.postgresql.Driver is handling the content. I've also tried quoting with $$ instead of ', but that just gives me: ERROR: syntax error at or near "$". Does anyone have insight into how to get org.postgresql.Driver to play nice with a PL/pgSQL function? -Paul [email protected]
migrate-pregroup-alarm-contacts.sql
Description: migrate-pregroup-alarm-contacts.sql
_______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
