This patch brings the postgres port up to synch with CVS , aswell as fixes the following bugs

1) Get rid of PEAR. this patch contains a new database.pgsql.inc file, which makes database.pear.inc obsolete , aswell as make thousands less lines of code that has to be loaded.
2) User role addition fails.

All of the new functionality I have tested , and confirmed to work (profiles, filters , templates and locales).

Comments

adrian’s picture

StatusFileSize
new6.8 KB

Here is an updated patch, which fixes some more problems i found in testing, but more importantly .. fixes Cache problem with Postgres by introducing new db_encode_blob and db_decode_blob functions.

This patch also includes the relevant functions for database.mysql.inc and the patch for bootstrap.inc

dries’s picture

Just a small note: getting rid of PEAR and introducing new database abstraction function is somewhat intrusive at this point and could do with being tested by others. Thumb up this patch if it works for you.

adrian’s picture

Rolled in some more verified patches.

1) Menu problems with Postgres (this is a highly critical 1 line fix)
2) Archive module fails with Postgres
3) Postgres setup problems - changes to database.pgsql (although i made these changes myself before finding this patch)
4) Book module fails with Postgres
5) Postgres problems following creation of a new type of user - which is actually about a taxonomy.module bug.
6) Creating accregator_item_table in PostgreSQL

Most of these patches are marked as release critical.

Like dries said, this patch needs some testing from postgres users, also .. can anyone tell me if Postgres problem in user.module and SELECT statements broken if using Postgresql are still valid?

adrian’s picture

StatusFileSize
new8.02 KB

and here is the actual patch

adrian’s picture

StatusFileSize
new8.73 KB

I missed something with the filter update and database.pgsql , but it's fixed now.

Also found two other patches that were rolled in.

1) Postgres - Polls not displayed on Poll Page
2) Blog module has sql errors with postgres

Thanks to alan chandler for most of these patches.

dries’s picture

Committed to HEAD. Continue testing the PostgreSQL backend please.

AlanChandler’s picture

I am trying to test this, but I can't even get started.

All I get is

Warning: pg_connect(): Cannot create new link. Too many open links (0) in /usr/share/drupal/includes/database.pgsql.inc on line 28

Warning: pg_last_error(): No PostgreSQL link opened yet in /usr/share/drupal/includes/database.pgsql.inc on line 28

I assume this is something simple - but I don't know what

AlanChandler’s picture

I mistakenly added an extension=pgsql.so to my php.ini. This appears to be a no no.

Anonymous’s picture

Using from HEAD as of this morning and everything appears to work fine. :)

Anonymous’s picture

JoeWalker’s picture

Version: » 4.6.0

I was just about to give up with Drupal's postgres support and go through some extreme pain in moving my data to mysql. Maybe this could help me out.

Will the patch work against 4.6.2/3?
Given that my site is live working, but only hobbling along would you recommend that I had a go with this? Is having a go with this likely to make an upgrade to 4.7 harder? Would I be better off just going straight to HEAD?

Cvbge’s picture

This patch probably won't work.
Please use CVS ("HEAD") version, or one of 4.7 betas.