Closed (fixed)
Project:
Drupal core
Version:
4.7.0-rc2
Component:
postgresql database
Priority:
Critical
Category:
Bug report
Reporter:
Created:
10 Apr 2006 at 17:10 UTC
Updated:
27 Apr 2006 at 10:45 UTC
Jump to comment: Most recent file
A preinstall of drupal4.7-rc2 fails on postgresql database setup:
I created the database drupal4.7 following the INSTALL.pgsql.txt and then:
postgres@linux:/srv/www/htdocs/drupal-4-7-0-rc2> psql -q -f database/database.pgsql drupal4.7 drupal
psql:database/database.pgsql:878: ERROR: parser: parse error at or near "SEQUENCE" at character 7
psql:database/database.pgsql:905: ERROR: Type "anyelement" does not exist
My postgresql-version (SUSE 9.0):
linux:/srv/www/htdocs/drupal-4-7-0-rc2 # psql -V
psql (PostgreSQL) 7.3.10
The drupal requirements tell it's ok to use postgresql version>=7.3 so this should work....
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | pgsql_7.3_compatibility-58113_0.diff.txt | 2.53 KB | Cvbge |
Comments
Comment #1
peterdd commentedand here the lines of database/database.pgsql that provokes the errors:
876 --- Alter some sequences
877 ---
878 ALTER SEQUENCE menu_mid_seq RESTART 3;
903 CREATE OR REPLACE FUNCTION "if"(boolean, anyelement, anyelement) RETURNS anyelement AS '
904 SELECT CASE WHEN $1 THEN $2 ELSE $3 END;
905 ' LANGUAGE 'sql';
Comment #2
Cvbge commentedHi, thanks you for your report.
Please try attache patch, it should fix the problems.
It changes the IF() function to use "text" and "integer" types instead of "anyelement" which does not exists in postgres 7.3.
It also changes the way that "Primary links" menu is inserted, thus removing the need for ALTER SEQUENCE which also does not exists in postgres 7.3 [in fact, it could be done easier, but I don't know if mid column in menu table can contain 0 as correct value or not]
Also adds a case to prefix.sh as side effect (
" DEFAULT nextval('")Comment #3
adrinux commentedThis patch appears to cause no problems with pgsql 8.07, I was able to complete the installation process without errors.
Comment #4
adrian commentedTested and works on postgres 8.0.1.
I also tested the forum module, which is the only occurence of the function.
it is used to generate the forum listing.
Comment #5
killes@www.drop.org commentedI've applied the patch. No idea if it fixes pgsql 7.3. I am ok with not supporting it if it doesn't.
Comment #6
(not verified) commented