Fix bogus handling of bad strategy number in GIST consistent() functions.

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

Commit: 4dfb065b3ab662dcc96d07ee7fc9dadf6975a0cb
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-04-14T15:18:47Z
Releases: 9.4.0
Fix bogus handling of bad strategy number in GIST consistent() functions.

Make sure we throw an error instead of silently doing the wrong thing when
fed a strategy number we don't recognize.  Also, in the places that did
already throw an error, spell the error message in a way more consistent
with our message style guidelines.

Per report from Paul Jones.  Although this is a bug, it won't occur unless
a superuser tries to do something he shouldn't, so it doesn't seem worth
back-patching.

Files

PathChange+/−
src/backend/access/gist/gistproc.c modified +13 −5