Partially support the PostgreSQL backend in the PDO pseudo-engine
This commit is contained in:
parent
02aa98967b
commit
870137241a
|
@ -89,6 +89,7 @@ static PDO * _pdo_init(Config * config, char const * section)
|
||||||
{
|
{
|
||||||
PDO * pdo;
|
PDO * pdo;
|
||||||
char const * dsn;
|
char const * dsn;
|
||||||
|
char const pgsql[] = "pgsql:";
|
||||||
char const sqlite3[] = "sqlite:";
|
char const sqlite3[] = "sqlite:";
|
||||||
char const * backend = NULL;
|
char const * backend = NULL;
|
||||||
|
|
||||||
|
@ -107,6 +108,12 @@ static PDO * _pdo_init(Config * config, char const * section)
|
||||||
config_set(config, section, "filename",
|
config_set(config, section, "filename",
|
||||||
&dsn[sizeof(sqlite3) - 1]);
|
&dsn[sizeof(sqlite3) - 1]);
|
||||||
}
|
}
|
||||||
|
else if(strncmp(dsn, pgsql, sizeof(pgsql) - 1) == 0)
|
||||||
|
{
|
||||||
|
backend = "pgsql";
|
||||||
|
section = "database::pgsql";
|
||||||
|
/* FIXME really parse the DSN */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
/* XXX report error */
|
/* XXX report error */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user