Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I usually use PostgreSQL as major database for Drupal. And when I used module Contemplate, I got error messages:
warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "contemplate" does not exist in /www/hosting/852/www/includes/database.pgsql.inc on line 125.
user warning: query: SELECT * FROM contemplate in /www/hosting/852/www/includes/database.pgsql.inc on line 144.
Comment | File | Size | Author |
---|---|---|---|
#6 | contemplate.install.172775.patch | 867 bytes | jaydub |
#4 | contemplate.install.patch | 1.28 KB | ghing |
Comments
Comment #1
suzanne.aldrich CreditAttribution: suzanne.aldrich commentedYeah, I have the same error, only I tried the -dev version and got it. Too bad, because I really wanted to try this module out.
Comment #2
suzanne.aldrich CreditAttribution: suzanne.aldrich commentedThis is the exact error I receive when enabling 5.x-1.x-dev version of Contemplate with a pgsql db on Drupal 5.2:
Comment #3
erlang CreditAttribution: erlang commentedYes, I get the same error with psql. both with stable and dev!
Comment #4
ghing CreditAttribution: ghing commentedI'm pretty new to postgres, but I think the problem is just that the install scripts that create the tables are using MySQL-only types. I created the tables by hand using the following SQL statements:
I have also attached a patch to contemplate.install that should fix the problem with the installer, though I haven't been able to test it, since I don't really know how to get drupal to re-run the database creation step of an already known module.
Thanks,
Geoff
Comment #5
codenamerhubarb CreditAttribution: codenamerhubarb commentedI had a problem and accidentally deleted my contemplate and contemplate_files database tables. I had to recreate them in phpMyAdmin by clicking on SQL and entering this code...
Firstly......
CREATE TABLE contemplate (
type character(32) DEFAULT '' NOT NULL,
teaser text NOT NULL,
body text NOT NULL,
rss text NOT NULL,
enclosure character(128) NOT NULL,
flags integer DEFAULT 0 NOT NULL,
PRIMARY KEY (type)
);
and secondly.....
CREATE TABLE contemplate_files (
site varchar(255) NOT NULL,
`data` longblob NOT NULL,
UNIQUE KEY site (site(255))
);
--------------------------------------
Note that the code for CREATE TABLE contemplate_files is slightly different to what ghing provided because that gave me a syntax error.
Comment #6
jaydub CreditAttribution: jaydub commentedattached is my patch for this issue.
Tested on Drupal 5.7 and was able to successfully install the tables in PostgreSQL. I have not tested further use of the module at this point.
Comment #7
jrglasgow CreditAttribution: jrglasgow commentedPatch has been applied to 5.x-1.x-dev will also be included in next release. I also applied the patch to 6.x-1.x-dev.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
ajg112 CreditAttribution: ajg112 commentedThis still seems to be an issue. I've just installed contemplate-5.x-2.01 and am getting the same warnings.
Are there any plans to integrate the various patches into a new release?
Comment #10
jrglasgow CreditAttribution: jrglasgow commentedThe patch in comment #6 has been applied, see comment #7. I don't have any machines with PostgreSQL installed, if you have anymore patches you want applied, I am more than happy to apply them.
Comment #11
ajg112 CreditAttribution: ajg112 commentedI've tried contemplate again with a fresh install.
Drupal 5.7
Postgresql 8.3.0
cck-5.x-1.6-1
contemplate-5.x-2.01
Module installation completes without errors, but when creating a template errors occur. I've made two adjustments in contemplate.module that seem to stop the warnings/errors.
Comment #12
jrglasgow CreditAttribution: jrglasgow commentedThese changes have been committed, will appear in the next release.