diff options
author | Tom Lane | 2005-10-15 20:28:59 +0000 |
---|---|---|
committer | Tom Lane | 2005-10-15 20:28:59 +0000 |
commit | b562639561c11e2c54042de847106222d8f698d9 (patch) | |
tree | 22ce42dddc78f4611913cc145fe119978b2f1bd1 | |
parent | 0631059c9c5a77b8a7f3332e0f7e4320c40c6e82 (diff) |
Fix bogus error test in get_ti_Oid().
-rw-r--r-- | contrib/tsearch2/ts_stat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/tsearch2/ts_stat.c b/contrib/tsearch2/ts_stat.c index 2cde25df8e5..b8ecf96e6db 100644 --- a/contrib/tsearch2/ts_stat.c +++ b/contrib/tsearch2/ts_stat.c @@ -412,6 +412,7 @@ ts_accum_finish(PG_FUNCTION_ARGS) } static Oid tiOid = InvalidOid; + static void get_ti_Oid(void) { @@ -422,7 +423,7 @@ get_ti_Oid(void) /* internal error */ elog(ERROR, "SPI_exec to get tsvector oid returns %d", ret); - if (SPI_processed < 0) + if (SPI_processed < 1) /* internal error */ elog(ERROR, "There is no tsvector type"); tiOid = DatumGetObjectId(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull)); |