postgresql/contrib/tsearch2
Tom Lane 220db7ccd8 Simplify and standardize conversions between TEXT datums and ordinary C
strings.  This patch introduces four support functions cstring_to_text,
cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and
two macros CStringGetTextDatum and TextDatumGetCString.  A number of
existing macros that provided variants on these themes were removed.

Most of the places that need to make such conversions now require just one
function or macro call, in place of the multiple notational layers that used
to be needed.  There are no longer any direct calls of textout or textin,
and we got most of the places that were using handmade conversions via
memcpy (there may be a few still lurking, though).

This commit doesn't make any serious effort to eliminate transient memory
leaks caused by detoasting toasted text objects before they reach
text_to_cstring.  We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few
places where it was easy, but much more could be done.

Brendan Jurd and Tom Lane
2008-03-25 22:42:46 +00:00
..
data
expected Adjust contrib/tsearch2 regression results to use XML tag and XML entity descriptions, as now used by core text search default parser. 2007-11-20 04:23:10 +00:00
sql Resurrect the code for the rewrite(ARRAY[...]) aggregate function, 2007-11-13 22:14:50 +00:00
Makefile Replace the now-incompatible-with-core contrib/tsearch2 module with a 2007-11-13 21:02:29 +00:00
tsearch2.c Simplify and standardize conversions between TEXT datums and ordinary C 2008-03-25 22:42:46 +00:00
tsearch2.sql.in Adjust the names of a couple of tsearch index support functions that had 2007-11-28 19:33:05 +00:00
uninstall_tsearch2.sql Add snb_ru_init(internal) to list of stub functions in tsearch2 2007-11-16 00:34:54 +00:00