we had the code slightly out of order, you should update to latest trunk for the right version. The test of 2 deletes is to see if your odbc driver will fail when trying to execute 2 statements at once so I can properly fail over to sqlite because transactions are mandatory for a database running core in odbc. On Sat, Nov 21, 2009 at 6:02 AM, Mike Tkachuk <mike@yes.net.ua> wrote:
Hello,
Looks like the issue is not in multi statements in one request. Manually creating DB schema helped and everything started up. I will continue testing
Also in code I see such construction:
switch_cache_db_execute_sql(dbh, "begin;delete from channels where hostname='';delete from channels where hostname='';commit;", &err); Anyone can explain why to do such delete twice and in transaction?
Thanks.
Saturday, November 21, 2009 1:41:06 PM, you wrote:
MT> Hello Folks,
MT> I'm interesting in completely moving away from sqlite and use MT> postgresql everywhere including core ( switch_core.c )
MT> All other applications can use odbc without issues (sofia, limit, MT> fifo etc), but as I see in core only sqlite3 supported.
MT> I correctly set 'core-db-dsn' parameter, but looks like the problem MT> that latest psqlodbc_08_04_0100 don't support multiple statements in MT> one request that is often used in switch_core_sqldb.c:
sql = switch_mprintf( "update channels set uuid='%q' where uuid='%q' and hostname='%q';" "update calls set caller_uuid='%q' where caller_uuid='%q' and hostname='%q';" "update calls set callee_uuid='%q' where callee_uuid='%q' and hostname='%q'", switch_event_get_header_nil(event, "unique-id"), ... SKIP ...
MT> So, does anyone have any clue how to us postgresql in the FS core?
MT> Thanks.
MT> -- MT> Mike Tkachuk
-- Mike Tkachuk
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400