MantisBT - TestLink
View Issue Details
0008525TestLinkDatabase Postgrespublic2018-12-27 13:532018-12-29 09:05
normalfeature requestalways
Mac OS XOS X10.9.5
1.9.18 (2018 Q3) 
0008525: Postgres support through PDO driver
I'm not able to install PHP with native postgres support, although I do have Postgres PDO (pdo_pgsql) support enabled.
I'm willing to work on this.
No tags attached.
Issue History
2018-12-27 13:53ernyNew Issue
2018-12-27 16:25fmanNote Added: 0028391
2018-12-27 16:27fmanNote Edited: 0028391bug_revision_view_page.php?bugnote_id=28391#r5705
2018-12-27 16:27fmanStatusnew => feedback
2018-12-28 11:31ernyNote Added: 0028392
2018-12-28 11:31ernyStatusfeedback => new
2018-12-28 11:41ernyNote Edited: 0028392bug_revision_view_page.php?bugnote_id=28392#r5707
2018-12-28 13:13fmanNote Added: 0028393
2018-12-28 20:27ernyNote Added: 0028395
2018-12-29 09:05fmanNote Added: 0028399

2018-12-27 16:25   
(edited on: 2018-12-27 16:27)
this is your choice, but I'm not going to provide support on this, till will not be the only available choice.
Hope you will understand

>> I'm willing to work on this.
means you will provide changes with config option to enable/disable this through a Pull request, I'm going to give a look

have you checked if there is a change with ADODB PHP to use PDO drivers ?

2018-12-28 11:31   
(edited on: 2018-12-28 11:41)
I'm using ADO PDO Driver, but teslink_1_9 branch seems not to support it out of the box.

Here goes first version of PR: [^]

The current changes are only considering the postgres case, checking for drivers pgsql and pdo_pgsql. This should be backwards compatible (note that I'm writing a new value to

IMHO: database and driver used to access it should be separated into two values: the database tells the SQL dialect and the driver is a low level issue (if PHP has support for it or not). Although, installNewDB lists it separately (pgsql Fail, pdo_pgsql OK), perhaps the end user should only be informed which DB as accessible and which driver it uses (or in case it failed, which drivers has been tested for). I just didn't want to change the code too much.

Other backends to consider could be: pdo_mssql, pdo_mysql, pdo_oci (oracle), pdo_sqlite, pdo_sqlsrv.


2018-12-28 13:13   
A short but clear description of changes done from a logical point of view is needed, because the code IMHO cannot be the source of the design choice

>> IMHO: database and driver used to access it should be separated into two values
need to think about, but do not think this is a good thing to do.

It will be interesting to understand why using PDO is a must or not.
Also, it will be interesting to understand why you can not install the other kind of drivers.

Checking ADOBPHP documentation, I've found (if I'm not wrong) that for postgres the suggested driver is postgres9 and not anything related to PDO.

In addition due to how this application is managed, talking about other PDO drivers in this issue is wrong.

Just for the records, I'm using postgres on MacOS using MAMP without any issues.
2018-12-28 20:27   
Ok, leave it on stand-by.

I'm using php installed through homebrew. I was not able to configure it with native postgres support. But I had pdo_postgres support enabled. For me, it's working ok now.
2018-12-29 09:05   
according to ADODB site [^]