[OpenSIPS-Devel] [ opensips-Bugs-2814081 ] db modules for postgres named incorrectly

SourceForge.net noreply at sourceforge.net
Mon Jun 29 18:05:31 CEST 2009


Bugs item #2814081, was opened at 2009-06-29 17:05
Message generated for change (Tracker Item Submitted) made by gordonross
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2814081&group_id=232389

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.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gordon Ross (gordonross)
Assigned to: Nobody/Anonymous (nobody)
Summary: db modules for postgres named incorrectly

Initial Comment:
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

loadmodule "db_pgsql.so"

and DB URIs of:

"pgsql://opensips:opensipsrw@localhost/opensips"

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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2814081&group_id=232389



More information about the Devel mailing list