Hello!
I am interesting how the modules of drupal work with PostgreSQL?
I use Drupal 5.2 and PostgreSQL 8.2.1.
I try to use the modules: Archive and Archiver and I have warnings.
For Archiver I didn't have problems on installation, but when I try to use it I get these warnings:
warning: pg_query(): Query failed: ERROR: relaţia "archiver" does not exist in /var/www/html/drupal-5.2/includes/database.pgsql.inc on line 125. user warning: query: SELECT COUNT(nid) AS count FROM archiver WHERE nid=28 in /var/www/html/drupal-5.2/includes/database.pgsql.inc on line 144.
and with Archive I have problems on instalation:
warning: Missing argument 2 for archive_help() in /var/www/html/drupal-5.2/modules/archive/archive.module on line 7. warning: Missing argument 2 for archive_help() in /var/www/html/drupal-5.2/modules/archive/archive.module on line 7.
Thanks!
Violeta
On Thu, 4 Oct 2007 09:18:15 +0300 "Violeta Creteanu" miriam.crete@gmail.com wrote:
Hello!
I am interesting how the modules of drupal work with PostgreSQL?
I use Drupal 5.2 and PostgreSQL 8.2.1.
I try to use the modules: Archive and Archiver and I have warnings.
For Archiver I didn't have problems on installation, but when I try to use it I get these warnings:
warning: pg_query(): Query failed: ERROR: relaţia "archiver" does not exist in /var/www/html/drupal-5.2/includes/database.pgsql.inc on line 125. user warning: query: SELECT COUNT(nid) AS count FROM archiver WHERE nid=28 in /var/www/html/drupal-5.2/includes/database.pgsql.inc on line 144.
This looks like it didn't create the required tables during install. You can do it manually.
and with Archive I have problems on instalation:
warning: Missing argument 2 for archive_help() in /var/www/html/drupal-5.2/modules/archive/archive.module on line 7. warning: Missing argument 2 for archive_help() in /var/www/html/drupal-5.2/modules/archive/archive.module on line 7.
I don't know. I should look at the module.
Drupal modules with postgres mostly work. Sometimes you've to tweak the sql by yourself. Major annoyance is keeping up with new module versions, security and such.
Submitting patch back wasn't so successful. I think because I completely ignore to provide 2 DB layers and just tweaked the SQL statement inside the DB so it could work with pgsql *and* mysql.
I had the impression anyway that very few modules provide separate DB layers and have most of the SQL statement hard coded.
At this time I just needed to fix a couple of modules in a very simple way. It was too much of a work to rewrite the module to actually provide 2 DB layers and submit it back to the maintainer with higher chances to see it included compared to fix the module everytime.
On Thursday 04 October 2007, Ivan Sergio Borgonovo wrote:
I don't know. I should look at the module.
Drupal modules with postgres mostly work. Sometimes you've to tweak the sql by yourself. Major annoyance is keeping up with new module versions, security and such.
Submitting patch back wasn't so successful. I think because I completely ignore to provide 2 DB layers and just tweaked the SQL statement inside the DB so it could work with pgsql *and* mysql.
I had the impression anyway that very few modules provide separate DB layers and have most of the SQL statement hard coded.
At this time I just needed to fix a couple of modules in a very simple way. It was too much of a work to rewrite the module to actually provide 2 DB layers and submit it back to the maintainer with higher chances to see it included compared to fix the module everytime.
In 99.5% of cases, a module should not be writing anything database-specific in its queries. The only place it should care about the database type at all is in the install hook, where it has to switch on the database type. The SQL in the module should be DB-agnostic.
Not all module authors provide or even care about the necessary create table statements for Postgres, however. That's not malice. That's simply because most module authors know MySQL, have MySQL, and can test MySQL. They neither know, use, nor can test on PostgreSQL. I know many of my modules don't have any worthwhile support for or testing on PostgreSQL, because I never use PostgreSQL and so would have no way to say if the code I'm writing actually works.