[support] Modules and Postgres
Larry Garfield
larry at garfieldtech.com
Fri Oct 5 02:04:45 UTC 2007
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.
--
Larry Garfield AIM: LOLG42
larry at garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
More information about the support
mailing list