summaryrefslogtreecommitdiff
path: root/contrib/unaccent
Commit message (Collapse)AuthorAgeFilesLines
* Update unaccent extension for parallel query.Robert Haas2016-06-144-7/+16
| | | | | | All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
* fix typo in commentTeodor Sigaev2016-03-161-1/+1
|
* Improve script generating unaccent rulesTeodor Sigaev2016-03-162-56/+762
| | | | | | Script now use the standard Unicode transliterator Latin-ASCII. Author: Leonard Benedetti
* Update copyright for 2016Bruce Momjian2016-01-021-1/+1
| | | | Backpatch certain files through 9.1
* Make unaccent handle all diacritics known to Unicode, and expand ligatures ↵Teodor Sigaev2015-09-042-66/+415
| | | | | | | | | | correctly Add Python script for buiding unaccent.rules from Unicode data. Don't backpatch because unaccent changes may require tsvector/index rebuild. Thomas Munro <thomas.munro@enterprisedb.com>
* Update copyright for 2015Bruce Momjian2015-01-061-1/+1
| | | | Backpatch certain files through 9.0
* Fix typos in some error messages thrown by extension scripts when fed to psql.Andres Freund2014-08-251-1/+1
| | | | | | | | | | Some of the many error messages introduced in 458857cc missed 'FROM unpackaged'. Also e016b724 and 45ffeb7e forgot to quote extension version numbers. Backpatch to 9.1, just like 458857cc which introduced the messages. Do so because the error messages thrown when the wrong command is copy & pasted aren't easy to understand.
* Add file version information to most installed Windows binaries.Noah Misch2014-07-141-1/+2
| | | | | | | | Prominent binaries already had this metadata. A handful of minor binaries, such as pg_regress.exe, still lack it; efforts to eliminate such exceptions are welcome. Michael Paquier, reviewed by MauMau.
* Fix inadequately-sized output buffer in contrib/unaccent.Tom Lane2014-07-011-21/+24
| | | | | | | | | | | | | | | | | The output buffer size in unaccent_lexize() was calculated as input string length times pg_database_encoding_max_length(), which effectively assumes that replacement strings aren't more than one character. While that was all that we previously documented it to support, the code actually has always allowed replacement strings of arbitrary length; so if you tried to make use of longer strings, you were at risk of buffer overrun. To fix, use an expansible StringInfo buffer instead of trying to determine the maximum space needed a-priori. This would be a security issue if unaccent rules files could be installed by unprivileged users; but fortunately they can't, so in the back branches the problem can be labeled as improper configuration by a superuser. Nonetheless, a memory stomp isn't a nice way of reacting to improper configuration, so let's back-patch the fix.
* Issue a WARNING about invalid rule file format in contrib/unaccent.Tom Lane2014-06-301-2/+8
| | | | | | | | | | | We were already issuing a WARNING, albeit only elog not ereport, for duplicate source strings; so warning rather than just being stoically silent seems like the best thing to do here. Arguably both of these complaints should be upgraded to ERRORs, but that might be more behavioral change than people want. Note: the faulty line is already printed via an errcontext hook, so there's no need for more information than these messages provide.
* Allow multi-character source strings in contrib/unaccent.Tom Lane2014-06-301-32/+59
| | | | | | | | | This could be useful in languages where diacritic signs are represented as separate characters; more generally it supports using unaccent dictionaries for substring substitutions beyond narrowly conceived "diacritic removal". In any case, since the rule-file parser doesn't complain about multi-character source strings, it behooves us to do something unsurprising with them.
* Allow empty replacement strings in contrib/unaccent.Tom Lane2014-06-301-6/+23
| | | | | | | | | | | This is useful in languages where diacritic signs are represented as separate characters; it's also one step towards letting unaccent be used for arbitrary substring substitutions. In passing, improve the user documentation for unaccent, which was sadly vague about some important details. Mohammad Alhashash, reviewed by Abhijit Menon-Sen
* Create function prototype as part of PG_FUNCTION_INFO_V1 macroPeter Eisentraut2014-04-181-3/+0
| | | | | | | | | | | | | | | | | Because of gcc -Wmissing-prototypes, all functions in dynamically loadable modules must have a separate prototype declaration. This is meant to detect global functions that are not declared in header files, but in cases where the function is called via dfmgr, this is redundant. Besides filling up space with boilerplate, this is a frequent source of compiler warnings in extension modules. We can fix that by creating the function prototype as part of the PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway. That makes the code of modules cleaner, because there is one less place where the entry points have to be listed, and creates an additional check that functions have the right prototype. Remove now redundant prototypes from contrib and other modules.
* Update copyright for 2014Bruce Momjian2014-01-071-1/+1
| | | | | Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
* unaccent: Revert patch 9299f6179838cef8aa1123f6fb76f0d3d6f2deccBruce Momjian2013-11-182-5/+5
| | | | | The reverted patch to change functions from strict to immutable was incorrect and needs additional research.
* unaccent: mark unaccent() functions as immutableBruce Momjian2013-10-082-5/+5
| | | | Suggestion from Pavel Stehule
* pgindent run for release 9.3Bruce Momjian2013-05-291-4/+4
| | | | | This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
* The data structure used in unaccent is a trie, not suffix tree.Heikki Linnakangas2013-05-081-28/+28
| | | | | | Fix the term used in variable and struct names, and comments. Alexander Korotkov
* Update copyrights for 2013Bruce Momjian2013-01-011-1/+1
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* Fix some typosPeter Eisentraut2012-04-221-1/+1
| | | | Josh Kupershmidt
* Update copyright notices for year 2012.Bruce Momjian2012-01-011-1/+1
|
* Fix assorted bugs in contrib/unaccent's configuration file parsing.Tom Lane2011-11-071-19/+67
| | | | | | | | | | | Make it use t_isspace() to identify whitespace, rather than relying on sscanf which is known to get it wrong on some platform/locale combinations. Get rid of fixed-size buffers. Make it actually continue to parse the file after ignoring a line with untranslatable characters, as was obviously intended. The first of these issues is per gripe from J Smith, though not exactly either of his proposed patches.
* Throw a useful error message if an extension script file is fed to psql.Tom Lane2011-10-122-0/+6
| | | | | | | | | | | | | | | | We have seen one too many reports of people trying to use 9.1 extension files in the old-fashioned way of sourcing them in psql. Not only does that usually not work (due to failure to substitute for MODULE_PATHNAME and/or @extschema@), but if it did work they'd get a collection of loose objects not an extension. To prevent this, insert an \echo ... \quit line that prints a suitable error message into each extension script file, and teach commands/extension.c to ignore lines starting with \echo. That should not only prevent any adverse consequences of loading a script file the wrong way, but make it crystal clear to users that they need to do it differently now. Tom Lane, following an idea of Andrew Dunstan's. Back-patch into 9.1 ... there is not going to be much value in this if we wait till 9.2.
* Remove unnecessary #include references, per pgrminclude script.Bruce Momjian2011-09-011-2/+0
|
* Support "make check" in contribPeter Eisentraut2011-04-251-0/+2
| | | | | | | | | | | | | | Added a new option --extra-install to pg_regress to arrange installing the respective contrib directory into the temporary installation. This is currently not yet supported for Windows MSVC builds. Updated the .gitignore files for contrib modules to ignore the leftovers of a temp-install check run. Changed the exit status of "make check" in a pgxs build (which still does nothing) to 0 from 1. Added "make check" in contrib to top-level "make check-world".
* Refix the unaccent regression test on MSVC properlyPeter Eisentraut2011-04-191-2/+3
| | | | | | ... for some value of "properly". Instead of overriding REGRESS_OPTS, set the variables ENCODING and NO_LOCALE, which is more expressive and allows overriding by the user. Fix vcregress.pl to handle that.
* Attempt to remedy buildfarm breakage caused by commit f536d4194.Andrew Dunstan2011-04-181-3/+2
|
* Rename pg_regress option --multibyte to --encodingPeter Eisentraut2011-04-151-2/+3
| | | | | Also refactor things a little bit so that the same methods for setting test locale and encoding can be used everywhere.
* Fix upgrade of contrib/intarray and contrib/unaccent from 9.0.Tom Lane2011-02-171-0/+5
| | | | | Take care of a couple of discrepancies between what you get from a fresh install and what the first-draft update-from-unpackaged scripts produced.
* Avoid use of CREATE OR REPLACE FUNCTION in extension installation files.Tom Lane2011-02-131-4/+4
| | | | | | | | | | | It was never terribly consistent to use OR REPLACE (because of the lack of comparable functionality for data types, operators, etc), and experimentation shows that it's now positively pernicious in the extension world. We really want a failure to occur if there are any conflicts, else it's unclear what the extension-ownership state of the conflicted object ought to be. Most of the time, CREATE EXTENSION will fail anyway because of conflicts on other object types, but an extension defining only functions can succeed, with bad results.
* Convert contrib modules to use the extension facility.Tom Lane2011-02-138-26/+19
| | | | | | | | | | | This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
* Stamp copyrights for year 2011.Bruce Momjian2011-01-011-1/+1
|
* Mark unaccent functions as STABLE, rather than defaulting to VOLATILE.Bruce Momjian2010-12-271-2/+2
|
* Remove useless whitespace at end of linesPeter Eisentraut2010-11-231-1/+1
|
* Some more gitignore cleanups: cover contrib and PL regression test outputs.Tom Lane2010-09-221-0/+2
| | | | | Also do some further work in the back branches, where quite a bit wasn't covered by Magnus' original back-patch.
* Convert cvsignore to gitignore, and add .gitignore for build targets.Magnus Hagander2010-09-221-0/+1
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-204-4/+4
|
* Standardize get_whatever_oid functions for other object types.Robert Haas2010-08-051-2/+2
| | | | | | | | | | | | | | | - Rename TSParserGetPrsid to get_ts_parser_oid. - Rename TSDictionaryGetDictid to get_ts_dict_oid. - Rename TSTemplateGetTmplid to get_ts_template_oid. - Rename TSConfigGetCfgid to get_ts_config_oid. - Rename FindConversionByName to get_conversion_oid. - Rename GetConstraintName to get_constraint_oid. - Add new functions get_opclass_oid, get_opfamily_oid, get_rewrite_oid, get_rewrite_oid_without_relid, get_trigger_oid, and get_cast_oid. The name of each function matches the corresponding catalog. Thanks to KaiGai Kohei for the review.
* pgindent run for 9.0Bruce Momjian2010-02-261-70/+72
|
* Update copyright for the year 2010.Bruce Momjian2010-01-021-2/+2
|
* Make unaccent's install/uninstall scripts look more like all the others.Tom Lane2009-11-142-13/+16
| | | | Set search_path explicitly, don't use IF EXISTS, etc.
* Print the actual DB encoding in the unaccent regression test.Tom Lane2009-08-182-0/+10
| | | | | This is to help make it more obvious what the problem is, if the encoding isn't what the test expects.
* Fix some *other* compiler warnings from a different gcc version.Tom Lane2009-08-181-3/+3
|
* Fix copy-and-pasteo that might explain some of the buildfarm'sTom Lane2009-08-181-5/+4
| | | | indigestion about this module.
* Suppress compiler warnings about uninitialized variables.Tom Lane2009-08-181-3/+3
|
* Unaccent dictionary.Teodor Sigaev2009-08-187-0/+648