Add a defense to prevent core dumps if 8.2 version of rank_cd() is used with

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 859b8dd51a0f4e5b7c9abe749cb83bffa7f11ce2
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-12-28T01:09:01Z
Releases: 8.3.0
Add a defense to prevent core dumps if 8.2 version of rank_cd() is used with
the 8.1 SQL function definition for it.  Per report from Rajesh Kumar Mallah,
such a DBA error doesn't seem at all improbable, and the cost of checking for
it is not very high compared to the cost of running this function.  (It would
have been better to change the C name of the function so it wouldn't be called
by the old SQL definition, but it's too late for that now in the 8.2 branch.)

Files

PathChange+/−
contrib/tsearch2/rank.c modified +17 −1
src/include/catalog/pg_type.h modified +2 −1