From: Reini U. <ru...@us...> - 2007-01-28 23:36:01
|
Update of /cvsroot/phpwiki/phpwiki/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16830 Modified Files: psql-initialize.sql psql-tsearch2.sql Log Message: Slight pgsql harmonization Index: psql-initialize.sql =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/schemas/psql-initialize.sql,v retrieving revision 1.16 retrieving revision 1.17 diff -u -2 -b -p -d -r1.16 -r1.17 --- psql-initialize.sql 23 Dec 2006 13:04:56 -0000 1.16 +++ psql-initialize.sql 28 Jan 2007 23:35:59 -0000 1.17 @@ -12,7 +12,7 @@ --================================================================ --- Which postgres user gets access to the tables? +-- Which postgresql user gets access to the tables? -- --- You should set this to the name of the postgres +-- You should set this to the name of the postgresql -- user who will be accessing the tables. -- See DATABASE_DSN in config.ini @@ -28,10 +28,4 @@ \set httpd_user 'wikiuser' ---================================================================ --- --- Don't modify below this point unless you know what you are doing. --- ---================================================================ - \set qprefix '\'' :prefix '\'' \set qhttp_user '\'' :httpd_user '\'' @@ -40,6 +34,16 @@ \echo '$ createdb phpwiki' \echo '$ createuser -S -R -d ' :qhttp_user -\echo '$ psql -U ' :qhttp_user ' phpwiki < /usr/share/postgresql/contrib/tsearch2.sql' -\echo '$ psql -U ' :qhttp_user ' phpwiki < psql-initialize.sql' +\echo '$ psql -U ' :qhttp_user ' ' :qprefix 'phpwiki < /usr/share/postgresql/contrib/tsearch2.sql' +\echo 'Did you customize the ispell and synonym dictionaries in psql-initialize.sql ?' +\echo '$ psql -U ' :qhttp_user ' ' :qprefix 'phpwiki < psql-initialize.sql' +-- remove the quit line below +\quit + +--================================================================ +-- +-- Don't modify below this point unless you know what you are doing. +-- +--================================================================ + \echo Initializing PhpWiki tables with: @@ -282,11 +286,11 @@ CREATE INDEX :accesslog_host_idx ON :acc --================================================================ --- Use the tsearch2 fulltextsearch extension: (recommended) 7.4, 8.0, 8.1 --- at first init it for the database: +-- Use the tsearch2 fulltextsearch extension: (recommended) 7.4, 8.0, 8.1, 8.2 +-- At first init it for the database: -- $ psql phpwiki < /usr/share/postgresql/contrib/tsearch2.sql --- example of ISpell dictionary +-- Example of ISpell dictionary: -- UPDATE pg_ts_dict SET dict_initoption='DictFile="/usr/local/share/ispell/russian.dict" ,AffFile ="/usr/local/share/ispell/russian.aff", StopFile="/usr/local/share/ispell/russian.stop"' WHERE dict_name='ispell_template'; --- example of synonym dict +-- Example of synonym dict: -- UPDATE pg_ts_dict SET dict_initoption='/usr/local/share/ispell/english.syn' WHERE dict_id=5; Index: psql-tsearch2.sql =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/schemas/psql-tsearch2.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -b -p -d -r1.1 -r1.2 --- psql-tsearch2.sql 7 Jan 2007 18:51:16 -0000 1.1 +++ psql-tsearch2.sql 28 Jan 2007 23:35:59 -0000 1.2 @@ -1,11 +1,16 @@ -- $Id$ --- use the tsearch2 fulltextsearch extension: (recommended) --- 7.4, 8.0, 8.1 --- $ psql phpwiki < /usr/share/postgresql/contrib/tsearch2.sql +-- Add the tsearch2 fulltextsearch extension to an existing phpwiki database. Recommended. +-- Tested with 7.4, 8.0, 8.1, 8.2 \set QUIET \set prefix '' -\set httpd_user 'phpwiki' +\set httpd_user 'wikiuser' +\echo 'You have to initialize the tsearch2 module first:' +\echo ' psql ' :prefix 'phpwiki < /usr/share/postgresql/contrib/tsearch2.sql' + +\echo 'Did you customize the ispell and synonym dictionaries?' +-- remove the quit line below +\quit --example of ISpell dictionary: -- UPDATE pg_ts_dict SET dict_initoption='DictFile="/usr/local/share/ispell/russian.dict" ,AffFile ="/usr/local/share/ispell/russian.aff", StopFile="/usr/local/share/ispell/russian.stop"' WHERE dict_name='ispell_template'; |