Tom Lane 1d369c9e90 Ensure Soundex difference() function handles empty input sanely.
fuzzystrmatch's difference() function assumes that _soundex()
always initializes its output buffer fully.  This was not so for
the case of a string containing no alphabetic characters, resulting
in unstable output and Valgrind complaints.

Fix by using memset() to fill the whole buffer in the early-exit
case.  Also make some cosmetic improvements (I didn't care for the
random switches between "instr[0]" and "*instr" notation).

Report and diagnosis by Alexander Lakhin (bug #17935).
Back-patch to all supported branches.

Discussion: https://postgr.es/m/17935-b99316aa79c18513@postgresql.org
2023-05-16 10:53:42 -04:00
..
2023-05-02 12:23:08 +09:00
2023-02-17 14:26:42 +09:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-03-09 10:52:41 -08:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-05-02 12:23:08 +09:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.