1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

pg_do_encoding_conversion cannot return NULL (at least not unless the input

is NULL), so remove some useless tests for the case.
This commit is contained in:
Tom Lane
2008-11-10 15:18:40 +00:00
parent d141e7493b
commit 2b74d45c1b
3 changed files with 3 additions and 15 deletions

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.6 2008/01/01 19:45:51 momjian Exp $
* $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.7 2008/11/10 15:18:40 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -262,9 +262,6 @@ dsnowball_lexize(PG_FUNCTION_ARGS)
strlen(txt),
GetDatabaseEncoding(),
PG_UTF8);
if (recoded == NULL)
elog(ERROR, "encoding conversion failed");
if (recoded != txt)
{
pfree(txt);
@ -294,9 +291,6 @@ dsnowball_lexize(PG_FUNCTION_ARGS)
strlen(txt),
PG_UTF8,
GetDatabaseEncoding());
if (recoded == NULL)
elog(ERROR, "encoding conversion failed");
if (recoded != txt)
{
pfree(txt);