I need to run a  DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need.

But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available?

P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc