diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-13 10:42:01 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-13 10:42:01 +0000 |
commit | 8a0a50d31790b81ff503f26179a70f391cb2e978 (patch) | |
tree | aef954d14eed44b983bd55409f30a1e9f380806c | |
parent | cdbf7b40013badfb534da4922da08b822b9975d9 (diff) | |
download | brdo-8a0a50d31790b81ff503f26179a70f391cb2e978.tar.gz brdo-8a0a50d31790b81ff503f26179a70f391cb2e978.tar.bz2 |
#58113, error on install with postgresql7.3.10, patch by Cvbge
-rw-r--r-- | database/database.pgsql | 16 | ||||
-rw-r--r-- | scripts/prefix.sh | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/database/database.pgsql b/database/database.pgsql index 1628a4b74..31f6ed7e3 100644 --- a/database/database.pgsql +++ b/database/database.pgsql @@ -390,8 +390,9 @@ CREATE INDEX locales_target_plural_idx ON locales_target(plural); -- +CREATE SEQUENCE menu_mid_seq START 2; CREATE TABLE menu ( - mid serial, + mid integer NOT NULL DEFAULT nextval('menu_mid_seq'), pid integer NOT NULL default '0', path varchar(255) NOT NULL default '', title varchar(255) NOT NULL default '', @@ -868,16 +869,11 @@ INSERT INTO locales_meta (locale, name, enabled, isdefault) VALUES ('en', 'Engli INSERT INTO variable (name, value) VALUES ('node_options_forum', 'a:1:{i:0;s:6:"status";}'); -INSERT INTO menu VALUES (2, 0, '', 'Primary links', '', 0, 115); +INSERT INTO menu(pid, path, title, description, weight, type) VALUES (0, '', 'Primary links', '', 0, 115); INSERT INTO variable VALUES ('menu_primary_menu', 'i:2;'); INSERT INTO variable VALUES ('menu_secondary_menu', 'i:2;'); --- ---- Alter some sequences ---- -ALTER SEQUENCE menu_mid_seq RESTART 3; - ---- --- Functions --- @@ -900,7 +896,11 @@ CREATE OR REPLACE FUNCTION "concat"(text, text) RETURNS text AS ' SELECT $1 || $2; ' LANGUAGE 'sql'; -CREATE OR REPLACE FUNCTION "if"(boolean, anyelement, anyelement) RETURNS anyelement AS ' +CREATE OR REPLACE FUNCTION "if"(boolean, text, text) RETURNS text AS ' + SELECT CASE WHEN $1 THEN $2 ELSE $3 END; +' LANGUAGE 'sql'; + +CREATE OR REPLACE FUNCTION "if"(boolean, integer, integer) RETURNS integer AS ' SELECT CASE WHEN $1 THEN $2 ELSE $3 END; ' LANGUAGE 'sql'; diff --git a/scripts/prefix.sh b/scripts/prefix.sh index d349b8a9c..dc8469d97 100644 --- a/scripts/prefix.sh +++ b/scripts/prefix.sh @@ -25,5 +25,6 @@ sed "s/^CREATE TABLE /CREATE TABLE $PREFIX/; s/^CREATE UNIQUE INDEX \(.*\) ON /CREATE UNIQUE INDEX $PREFIX\\1 ON $PREFIX/; s/^UPDATE \(.*\) SET /UPDATE $PREFIX\\1 SET /; s/^DROP TABLE IF EXISTS /DROP TABLE IF EXISTS $PREFIX/; + s/ DEFAULT nextval('/ DEFAULT nextval('$PREFIX/; " $2 |