PostgreSQL support

Is there any way to manually install the PHP extension for PostgreSQL (PDO_PGSQL), or is there any chance this might get pre-compiled in a future update?

This is required when working with external Postgres databases from a Local site.

Hi @christophrado! There aren’t any future plans to get this added but you’ve come to the right place. We follow our feature requests closely to see what our users need or would like to see in future releases. I only see one other user in the past who has mentioned needing this but now that you have a Feature Request up others may come to vote and comment.

@6foot5 did you ever find a workaround or solution to get this working for you?

Apologies, it’s a year later and I’m only seeing this now. I came back to search for any updates on Postgres support :laughing:

The workaround I’ve used up to now is pretty inconvenient but I’ll share in case it’s helpful in simple use cases - I first deploy code containing Postgres queries to our host and make sure the code runs at least once. The code contains conditional environment-specific logic such that the postgres query will only run on the host (not local) and (when run on the host) it copies the result of the query to the WP database. I’m then able to copy the WP database back down to my local environment and work with the “cached” output of the query so I have a realistic data model to work with.

Thankfully, I haven’t needed to do this too often, and when I do it’s been sufficient to have a single copy of the query’s result to use locally. If our needs get more complicated or frequent, this approach would become unworkable.

Anyway, that’s all I’ve come up with. I saw another post that suggested it might be possible to modify the php.ini file that Local uses and thus maybe add extensions like postgres. However, when I explored this myself, I was unable to make any progress.

Apologies for bumping such an old topic, but I wanted to add my vote to the feature request and supply this info in case it’s useful in any way. Cheers!

1 Like

Thank you for taking the time to come check and leave all those details @6foot5! Much appreciated. We’re always watching the forums for feature request interest, so we’ll continue to keep an eye on this, but in the meantime, hopefully, your information can be helpful for any other users who need a solution.