From 7ada2d31f47f1d378ae7d4ee2d044df1bb2b0c6a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 13 Feb 2017 11:02:23 -0500 Subject: Remove contrib/tsearch2. This module was intended to ease migrations of applications that used the pre-8.3 version of text search to the in-core version introduced in that release. However, since all pre-8.3 releases of the database have been out of support for more than 5 years at this point, we expect that few people are depending on it at this point. If some people still need it, nothing prevents it from being maintained as a separate extension, outside of core. Discussion: http://postgr.es/m/CA+Tgmob5R8aDHiFRTQsSJbT1oreKg2FOSBrC=2f4tqEH3dOMAg@mail.gmail.com --- doc/src/sgml/contrib.sgml | 1 - doc/src/sgml/filelist.sgml | 1 - doc/src/sgml/textsearch.sgml | 83 ------------------ doc/src/sgml/tsearch2.sgml | 203 ------------------------------------------- 4 files changed, 288 deletions(-) delete mode 100644 doc/src/sgml/tsearch2.sgml (limited to 'doc/src') diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index c8708ecf8bb..03e5889839d 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -142,7 +142,6 @@ CREATE EXTENSION module_name FROM unpackaged; &tablefunc; &tcn; &test-decoding; - &tsearch2; &tsm-system-rows; &tsm-system-time; &unaccent; diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 2624c627dcb..e7aa92f9141 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -151,7 +151,6 @@ - diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 67e4901c921..fe630a66b34 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -3864,87 +3864,4 @@ Parser: "pg_catalog.default" - - Migration from Pre-8.3 Text Search - - - Applications that use the - module for text searching will need some adjustments to work - with the - built-in features: - - - - - - Some functions have been renamed or had small adjustments in their - argument lists, and all of them are now in the pg_catalog - schema, whereas in a previous installation they would have been in - public or another non-system schema. There is a new - version of tsearch2 - that provides a compatibility layer to solve most problems in this - area. - - - - - - The old tsearch2 functions and other objects - must be suppressed when loading pg_dump - output from a pre-8.3 database. While many of them won't load anyway, - a few will and then cause problems. One simple way to deal with this - is to load the new tsearch2 module before restoring - the dump; then it will block the old objects from being loaded. - - - - - - Text search configuration setup is completely different now. - Instead of manually inserting rows into configuration tables, - search is configured through the specialized SQL commands shown - earlier in this chapter. There is no automated - support for converting an existing custom configuration for 8.3; - you're on your own here. - - - - - - Most types of dictionaries rely on some outside-the-database - configuration files. These are largely compatible with pre-8.3 - usage, but note the following differences: - - - - - Configuration files now must be placed in a single specified - directory ($SHAREDIR/tsearch_data), and must have - a specific extension depending on the type of file, as noted - previously in the descriptions of the various dictionary types. - This restriction was added to forestall security problems. - - - - - - Configuration files must be encoded in UTF-8 encoding, - regardless of what database encoding is used. - - - - - - In thesaurus configuration files, stop words must be marked with - ?. - - - - - - - - - - diff --git a/doc/src/sgml/tsearch2.sgml b/doc/src/sgml/tsearch2.sgml deleted file mode 100644 index 192eccd7326..00000000000 --- a/doc/src/sgml/tsearch2.sgml +++ /dev/null @@ -1,203 +0,0 @@ - - - - tsearch2 - - - tsearch2 - - - - The tsearch2 module provides backwards-compatible - text search functionality for applications that used - tsearch2 before text searching was integrated - into core PostgreSQL in release 8.3. - - - - Portability Issues - - - Although the built-in text search features were based on - tsearch2 and are largely similar to it, - there are numerous small differences that will create portability - issues for existing applications: - - - - - - Some functions' names were changed, for example rank - to ts_rank. - The replacement tsearch2 module - provides aliases having the old names. - - - - - - The built-in text search data types and functions all exist within - the system schema pg_catalog. In an installation using - tsearch2, these objects would usually have been in - the public schema, though some users chose to place them - in a separate schema of their own. Explicitly schema-qualified - references to the objects will therefore fail in either case. - The replacement tsearch2 module - provides alias objects that are stored in public - (or another schema if necessary) so that such references will still work. - - - - - - There is no concept of a current parser or current - dictionary in the built-in text search features, only of a current - search configuration (set by the default_text_search_config - parameter). While the current parser and current dictionary were used - only by functions intended for debugging, this might still pose - a porting obstacle in some cases. - The replacement tsearch2 module emulates these - additional state variables and provides backwards-compatible functions - for setting and retrieving them. - - - - - - There are some issues that are not addressed by the replacement - tsearch2 module, and will therefore require - application code changes in any case: - - - - - - The old tsearch2 trigger function allowed items in its - argument list to be names of functions to be invoked on the text data - before it was converted to tsvector format. This was removed - as being a security hole, since it was not possible to guarantee that - the function invoked was the one intended. The recommended approach - if the data must be massaged before being indexed is to write a custom - trigger that does the work for itself. - - - - - - Text search configuration information has been moved into core - system catalogs that are noticeably different from the tables used - by tsearch2. Any applications that examined - or modified those tables will need adjustment. - - - - - - If an application used any custom text search configurations, - those will need to be set up in the core - catalogs using the new text search configuration SQL commands. - The replacement tsearch2 module offers a little - bit of support for this by making it possible to load an old set - of tsearch2 configuration tables into - PostgreSQL 8.3. (Without the module, - it is not possible to load the configuration data because values in the - regprocedure columns cannot be resolved to functions.) - While those configuration tables won't actually do - anything, at least their contents will be available to be consulted - while setting up an equivalent custom configuration in 8.3. - - - - - - The old reset_tsearch() and get_covers() - functions are not supported. - - - - - - The replacement tsearch2 module does not define - any alias operators, relying entirely on the built-in ones. - This would only pose an issue if an application used explicitly - schema-qualified operator names, which is very uncommon. - - - - - - - - Converting a pre-8.3 Installation - - - The recommended way to update a pre-8.3 installation that uses - tsearch2 is: - - - - - - Make a dump from the old installation in the usual way, - but be sure not to use -c (--clean) - option of pg_dump or pg_dumpall. - - - - - - In the new installation, create empty database(s) and install - the replacement tsearch2 module into each - database that will use text search. This must be done - before loading the dump data! If your old installation - had the tsearch2 objects in a schema other - than public, be sure to adjust the - CREATE EXTENSION command so that the replacement - objects are created in that same schema. - - - - - - Load the dump data. There will be quite a few errors reported - due to failure to recreate the original tsearch2 - objects. These errors can be ignored, but this means you cannot - restore the dump in a single transaction (eg, you cannot use - pg_restore's - - - - - Examine the contents of the restored tsearch2 - configuration tables (pg_ts_cfg and so on), and - create equivalent built-in text search configurations as needed. - You may drop the old configuration tables once you've extracted - all the useful information from them. - - - - - - Test your application. - - - - - - At a later time you may wish to rename application references - to the alias text search objects, so that you can eventually - uninstall the replacement tsearch2 module. - - - - - - References - - Tsearch2 Development Site - - - - - -- cgit v1.2.3