tsearch2::trunc_to_max (private)
tsearch2::trunc_to_max txt
Defined in packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl
tsearch has (at least up to PostgreSQL 10) the limitation that the length of tsvector is 1MB. so make sure, we do not raise errors, when this happens. https://www.postgresql.org/docs/current/static/textsearch-limitations.html
- Parameters:
- txt (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set max_size_to_index [parameter::get -package_id [apm_package_id_from_key tsearch2-driver] -parameter max_size_to_index -default 1048575] if {$max_size_to_index == 0} { set max_size_to_index 1048575 } if {$max_size_to_index > 0 && [string length $txt] > $max_size_to_index} { ns_log notice "tsearch2: truncate overlong string to $max_size_to_index bytes" set txt [string range $txt 0 $max_size_to_index-1] } return $txtXQL Not present: Generic, Oracle PostgreSQL XQL file: packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql