pgsql: Fix bogus code in contrib/ tsearch dictionary examples.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix bogus code in contrib/ tsearch dictionary examples.
Дата
Msg-id E1RM6YT-0004qi-5U@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix bogus code in contrib/ tsearch dictionary examples.

Both dict_int and dict_xsyn were blithely assuming that whatever memory
palloc gives back will be pre-zeroed.  This would typically work for
just about long enough to run their regression tests, and no longer :-(.

The pre-9.0 code in dict_xsyn was even lamer than that, as it would
happily give back a pointer to the result of palloc(0), encouraging
its caller to access off the end of memory.  Again, this would just
barely fail to fail as long as memory contained nothing but zeroes.

Per a report from Rodrigo Hjort that code based on these examples
didn't work reliably.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3fbfd40b37eaf2db8698df1b5e41bc0fd6c80b51

Modified Files
--------------
contrib/dict_int/dict_int.c   |    2 +-
contrib/dict_xsyn/dict_xsyn.c |    2 ++
2 files changed, 3 insertions(+), 1 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix inline_set_returning_function() to allow multiple OUT parame
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix bogus code in contrib/ tsearch dictionary examples.