Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Gordon Ross (gordonross)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: db modules for postgres named incorrectly
The db_postgres module does not work in it's current incarnation in both trunk & 1.5.1
If you try and use postgres support out of the box, you get the following error:
"ERROR:core:db_check_api: module db_pgsql does not export db_use_table function"
The module is called pg_postgres, but the DB APIs assume pgsql. From my *very* brief look at the code, the core DB API routines assume the module name and the API name are the same. However, they are not in this case.
By changing the Makefile (to produce db_pgsql.so) and modifying pg_postgres.c line 55 to be "db_pgsql" rather than "db_postgres", you can then put
and DB URIs of:
Postgres support will then work with OpenSIPS.
This is just a dirty hack, though. The module directory name needs changing, and the db_postgres.c needs renaming to pg_pgsql.c, plus the Makefile needs updating as well.