postgresql/contrib/ltree
Tom Lane 9ff60273e3 Fix assorted inconsistencies in GiST opclass support function declarations.
The conventions specified by the GiST SGML documentation were widely
ignored.  For example, the strategy-number argument for "consistent" and
"distance" functions is specified to be a smallint, but most of the
built-in support functions declared it as an integer, and for that matter
the core code passed it using Int32GetDatum not Int16GetDatum.  None of
that makes any real difference at runtime, but it's quite confusing for
newcomers to the code, and it makes it very hard to write an amvalidate()
function that checks support function signatures.  So let's try to instill
some consistency here.

Another similar issue is that the "query" argument is not of a single
well-defined type, but could have different types depending on the strategy
(corresponding to search operators with different righthand-side argument
types).  Some of the functions threw up their hands and declared the query
argument as being of "internal" type, which surely isn't right ("any" would
have been more appropriate); but the majority position seemed to be to
declare it as being of the indexed data type, corresponding to a search
operator with both input types the same.  So I've specified a convention
that that's what to do always.

Also, the result of the "union" support function actually must be of the
index's storage type, but the documentation suggested declaring it to
return "internal", and some of the functions followed that.  Standardize
on telling the truth, instead.

Similarly, standardize on declaring the "same" function's inputs as
being of the storage type, not "internal".

Also, somebody had forgotten to add the "recheck" argument to both
the documentation of the "distance" support function and all of their
SQL declarations, even though the C code was happily using that argument.
Clean that up too.

Fix up some other omissions in the docs too, such as documenting that
union's second input argument is vestigial.

So far as the errors in core function declarations go, we can just fix
pg_proc.h and bump catversion.  Adjusting the erroneous declarations in
contrib modules is more debatable: in principle any change in those
scripts should involve an extension version bump, which is a pain.
However, since these changes are purely cosmetic and make no functional
difference, I think we can get away without doing that.
2016-01-19 12:04:36 -05:00
..
data Add ltree data type to contrib, from Teodor Sigaev and Oleg Bartunov. 2002-07-30 16:40:34 +00:00
expected Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
Makefile Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
_ltree_gist.c Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
_ltree_op.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
crc32.c pgindent run for 9.5 2015-05-23 21:35:49 -04:00
crc32.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
lquery_op.c Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04:00
ltree--1.0.sql Fix assorted inconsistencies in GiST opclass support function declarations. 2016-01-19 12:04:36 -05:00
ltree--unpackaged--1.0.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
ltree.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
ltree.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
ltree_gist.c Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
ltree_io.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
ltree_op.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ltreetest.sql Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
ltxtquery_io.c Prevent stack overflow in query-type functions. 2015-10-05 10:06:30 -04:00
ltxtquery_op.c Prevent stack overflow in query-type functions. 2015-10-05 10:06:30 -04:00