Skip to content

Commit b562639

Browse files
committed
Fix bogus error test in get_ti_Oid().
1 parent 0631059 commit b562639

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/tsearch2/ts_stat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ ts_accum_finish(PG_FUNCTION_ARGS)
412412
}
413413

414414
static Oid tiOid = InvalidOid;
415+
415416
static void
416417
get_ti_Oid(void)
417418
{
@@ -422,7 +423,7 @@ get_ti_Oid(void)
422423
/* internal error */
423424
elog(ERROR, "SPI_exec to get tsvector oid returns %d", ret);
424425

425-
if (SPI_processed < 0)
426+
if (SPI_processed < 1)
426427
/* internal error */
427428
elog(ERROR, "There is no tsvector type");
428429
tiOid = DatumGetObjectId(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy