By mediumgrade on
I am running Drupal 4.7 with a PostgreSQL 8.0 database.
I am trying to attach locations to a CCK type I have created. It works mostly fine except that when I view any of those nodes, I keep getting these errors:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "location_phone" does not exist in /var/www/html/SOMESITE/includes/database.pgsql.inc on line 94.
* user warning: query: SELECT phone FROM location_phone WHERE lid = 2 in /var/www/html/SOMESITE/includes/database.pgsql.inc on line 113.
Is this an error in the code or should I try to manually change the database somehow?
Comments
Okay, I am tired of this crap!
I figured out the problem with the location_phone table. When installing for PostgreSQL, the installer tries to apply THIS:
CREATE TABLE {location_phone} (
lid int NOT NULL default '0' CHECK (eid >= 0),
phone varchar(31) default NULL,
postal_code varchar(16) default NULL,
PRIMARY KEY (lid)
)
It needs to be changed to this:
CREATE TABLE location_phone (
lid int NOT NULL default '0' CHECK (lid >= 0),
phone varchar(31) default NULL,
postal_code varchar(16) default NULL,
PRIMARY KEY (lid)
)
This is just plain sad. If you're going to support PostgreSQL, then support it. If not, then let me know I should convert everything to MySQL. This is the third time in which I have had to manually change the installation scripts to accommodate for problems in PostgreSQL support.
If I am completely alone in my desire to use PostgreSQL with Drupal, then let me know. If not, then I would like to see more users like me come forward. I would love to help test modules for PostgreSQL support, but I can't do it alone.
I would like to
Hi Mediumgrade,
I too was wondering why people at Drupal are not interested in PostgreSql. It is the only best Open source Database with BSD license. I think we can do wonders if we optimize Drupal with PostgreSql.
postgresql
i've used postgresql for years, and now, while learning to use drupal, i find that most of it are mysql specific (at all in contributed modules, in optimization (speed) for queries, etc... in core modules).
In order to trully support Postgresql,... most queries should be rewritten; this is worse in modules like views: query constructor simply doesn't work in postgresql, (use syntax specific to mysql, groups by..., )).
well.. I see i'm not alone using (or trying to use) drupal with postgresql...
not alone
hi
i'd like to use postgres too, currently having seleral problems with it.
Please support postgres more! Maybe i can provide feedback if you want!
Maybe conversion scripts from/to mysql/postgres whould be useful too... what do you think?