diff options
Diffstat (limited to 'src/backend/utils/adt/tsrank.c')
-rw-r--r-- | src/backend/utils/adt/tsrank.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index d48e9b4a470..30ccfa3f617 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.2 2007/09/07 15:09:56 teodor Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.3 2007/09/07 15:35:10 teodor Exp $ * *------------------------------------------------------------------------- */ @@ -508,6 +508,10 @@ Cover(DocRepresentation *doc, int len, TSQuery query, Extention *ext) int i; bool found = false; + /* since this function recurses, it could be driven to stack overflow. + * (though any decent compiler will optimize away the tail-recursion. */ + check_stack_depth(); + reset_istrue_flag(query); ext->p = 0x7fffffff; |