1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

let the past begone in cvs land. welcome to igit igit!

This commit is contained in:
PSYC 2009-01-26 20:21:29 +01:00
commit 4e601cf1c7
509 changed files with 77963 additions and 0 deletions

23
world/net/d/pgsql.c Normal file
View file

@ -0,0 +1,23 @@
#include <net.h>
/*
* using one database connection is sufficient
*
* WARNING
* ONLY USE THIS IF YOUR DRIVER HAS THE SYNC PG PACKAGE
* (otherwise you dont have the pg_connect_sync and pg_query_sync efuns ;-)
*/
create() {
int ret;
#if defined(STORAGE_PGSQL)
ret = pg_connect_sync(STORAGE_PGSQL_CONNECT);
PT(("ret %d\n", ret))
#endif
}
mixed query(string q, varargs mixed args) {
// TODO: it might be wise to db_conv_string on each arg to
// avoid sql injections
return pg_query_sync(sprintf(q, args...));
}