Nicolas,
Maybe you don't want to use native scripting, but look on KEMI
<https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/kemi/>?
Regards,
Igor
Le 19.04.2022 à 18:25, Chaigneau, Nicolas a écrit :
Hello,
Trying again, in case this got unnoticed the first time.
I hope that by doing so I’m not breaching the rules of the mailing list.
If nobody answers, then I’ll conclude that nobody knows about that,
and shall not insist anymore. :)
Regards,
Nicolas.
*De :*sr-users <sr-users-bounces(a)lists.kamailio.org> *De la part de*
Chaigneau, Nicolas
*Envoyé :* vendredi 8 avril 2022 17:01
*À :* sr-users(a)lists.kamailio.org
*Objet :* [SR-Users] PostgreSQL - module sqlops - working with
prepared statements ?
Hello,
I’m using sql_xquery from sqlops module to execute requests on a
PostgreSQL database.
This work fine.
Now, for performance reasons, I would like to use prepared statements.
I’m wondering if this is possible using sql_xquery. I’ve looked at the
code and documentation, it seems it is not supported.
Can you confirm ?
If not possible with sql_xquery, is it possible with another existing
function ?
In the code, I’ve searched for « PQprepare » / « PQexecPrepared ».
These can be found only in « modules/db_postgres/pg_cmd.c », in
function « pg_cmd_exec » which is exported from
« modules/db_postgres/pg_mod.c » (see below).
I have no idea how to use these though… :/
Any ideas ?
/*
* Postgres module interface
*/
static cmd_export_t cmds[] = {
{"db_ctx", (cmd_function)NULL, 0, 0, 0, 0},
{"db_con", (cmd_function)pg_con, 0, 0, 0, 0},
{"db_uri", (cmd_function)pg_uri, 0, 0, 0, 0},
{"db_cmd", (cmd_function)pg_cmd, 0, 0, 0, 0},
{"db_put", (cmd_function)pg_cmd_exec, 0, 0, 0, 0},
{"db_del", (cmd_function)pg_cmd_exec, 0, 0, 0, 0},
{"db_get", (cmd_function)pg_cmd_exec, 0, 0, 0, 0},
{"db_upd", (cmd_function)pg_cmd_exec, 0, 0, 0, 0},
{"db_sql", (cmd_function)pg_cmd_exec, 0, 0, 0, 0},
{"db_res", (cmd_function)pg_res, 0, 0, 0, 0},
{"db_fld", (cmd_function)pg_fld, 0, 0, 0, 0},
{"db_first", (cmd_function)pg_cmd_first, 0, 0, 0, 0},
{"db_next", (cmd_function)pg_cmd_next, 0, 0, 0, 0},
{"db_setopt", (cmd_function)pg_setopt, 0, 0, 0, 0},
{"db_getopt", (cmd_function)pg_getopt, 0, 0, 0, 0},
{"db_bind_api", (cmd_function)db_postgres_bind_api, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0}
};
Regards,
Nicolas.
This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient, you are not authorized to read, print, retain,
copy, disseminate, distribute, or use this message or any part
thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
*sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users