Questions On Using PostgreSQL With Asterisk?

Have decided we’d like to manage Asterisk 18 LTS dynamically using Asterisk’s Real-Time architecture and Asterisk 18’s native/built-in PostgreSQL drivers.

We’ve installed PostgreSQL 14, created a PostgreSQL database named asterisk, and finally created a PostgreSQL database user (also asterisk) having access credentials (login/pw) to the asterisk database and ALL table privileges.

But after reviewing Asterisk Admin and other Documentation we’re confused on the Asterisk-specific steps we need to take next and have the following questions:

Question 1)
If Asterisk 18 has native/built-in PostgreSQL native drivers, do we need to install/build libpqxx?
When/Why would we need to install libpqxx?

Question 2)
Does Asterisk 18 have a single Asterisk file where we can activate/configure PostgreSQL or must we configure PostgreSQL in a separate file for every Asterisk Module or Resource that uses PostgreSQL?

Question 3)
Where do Asterisk’s PostgreSQL Table Definitions (schemas) come from? How do they get installed? Manually by us? Or automatically by Asterisk the first time it detects that PostgreSQL options have been selected and/or configured?

Inquiring minds wish to know :slight_smile:

You need only the C library and there is no need for a C++ binding. That said the recommendation would be to use PostreSQL with the ODBC driver.

The reason is that usually the ODBC driver is used for various DBs and not the native drivers. It’s basically a question about more installations and more experience.