From: <cb...@us...> - 2005-05-25 15:22:28
|
Update of /cvsroot/tikiwiki/tiki/db/convertscripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv889 Modified Files: Tag: BRANCH-1-9 mysql3topgsql72.php Log Message: Remove FULLTEXT indexes from postgres scripts. This is not ideal but is the quick solution. Indexing of text columns in Postgres seems to introduces a limit on the size of data in the text columns since the index row sizes can only be so large. Index: mysql3topgsql72.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/db/convertscripts/mysql3topgsql72.php,v retrieving revision 1.9.6.6 retrieving revision 1.9.6.7 diff -u -d -r1.9.6.6 -r1.9.6.7 --- mysql3topgsql72.php 25 May 2005 14:42:46 -0000 1.9.6.6 +++ mysql3topgsql72.php 25 May 2005 15:22:16 -0000 1.9.6.7 @@ -87,7 +87,14 @@ $stmt=preg_replace("/\n[ \t]+(PRIMARY KEY) *\((.+)\)/e","quote_prim_cols('$1','$2')",$stmt); // create indexes from KEY ... $stmt=preg_replace("/,\n[ \t]+KEY ([a-zA-Z0-9_]+) \((.+)\)/e","create_index('$1','$2')",$stmt); - $stmt=preg_replace("/,\n[ \t]+FULLTEXT KEY ([a-zA-Z0-9_]+) \((.+)\)/e","create_index('$1','$2')",$stmt); + + // Postgres does not support FULLTEXT indexing. If we were to index the text columns + // then there would be a limit to the size of the data that could occupy the text + // columns. + // Work arounds for this include adding the tsearch2 module to postgres and other drastic changes. + //$stmt=preg_replace("/,\n[ \t]+FULLTEXT KEY ([a-zA-Z0-9_]+) \((.+)\)/e","create_index('$1','$2')",$stmt); + $stmt=preg_replace("/,\n[ \t]+FULLTEXT KEY/","",$stmt); + $stmt=preg_replace("/,\n[ \t]+(UNIQUE) KEY ([a-zA-Z0-9_]+) \((.+)\)/e","create_index('$2','$3','$1')",$stmt); $stmt=preg_replace("/,\n[ \t]+(UNIQUE) *\((.+)\)/e","create_index('unknown','$2','$1')",$stmt); // explicit create index |