Commit 46fee741 authored by Dries's avatar Dries

- Patch #37589 by Cvgbe: make prefix.sh work with PostgreSQL: prefix indices properly.

parent ad74b700
......@@ -580,7 +580,7 @@ CREATE TABLE search_dataset (
type varchar(16) default NULL,
data text NOT NULL default ''
);
CREATE INDEX search_dataset_sid_type_idx on search_dataset(sid, type);
CREATE INDEX search_dataset_sid_type_idx ON search_dataset(sid, type);
--
-- Table structure for search_index
......
......@@ -1005,7 +1005,7 @@ function update_150() {
sid integer NOT NULL default '0',
type varchar(16) default NULL,
data text NOT NULL default '')");
$ret[] = update_sql("CREATE INDEX {search_dataset}_sid_type_idx on {search_dataset}(sid, type)");
$ret[] = update_sql("CREATE INDEX {search_dataset}_sid_type_idx ON {search_dataset}(sid, type)");
$ret[] = update_sql("CREATE TABLE {search_index} (
word varchar(50) NOT NULL default '',
......
......@@ -14,13 +14,13 @@
exit 1;
fi
PRFX=$1;
sed "s/^CREATE TABLE /CREATE TABLE $PRFX/;
s/^INSERT INTO /INSERT INTO $PRFX/;
s/^REPLACE /REPLACE $PRFX/;
s/^ALTER TABLE /ALTER TABLE $PRFX/;
s/^CREATE SEQUENCE /CREATE SEQUENCE $PRFX/;
s/^ALTER SEQUENCE /ALTER SEQUENCE $PRFX/;
s/^CREATE INDEX \(.*\) ON /CREATE INDEX \\1 ON $PRFX/;
PREFIX=$1;
sed "s/^CREATE TABLE /CREATE TABLE $PREFIX/;
s/^INSERT INTO /INSERT INTO $PREFIX/;
s/^REPLACE /REPLACE $PREFIX/;
s/^ALTER TABLE /ALTER TABLE $PREFIX/;
s/^CREATE SEQUENCE /CREATE SEQUENCE $PREFIX/;
s/^ALTER SEQUENCE /ALTER SEQUENCE $PREFIX/;
s/^CREATE INDEX \(.*\) ON /CREATE INDEX $PREFIX\\1 ON $PREFIX/;
" $2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment