postgresql/contrib/ltree
Heikki Linnakangas 5028f22f6e Switch to CRC-32C in WAL and other places.
The old algorithm was found to not be the usual CRC-32 algorithm, used by
Ethernet et al. We were using a non-reflected lookup table with code meant
for a reflected lookup table. That's a strange combination that AFAICS does
not correspond to any bit-wise CRC calculation, which makes it difficult to
reason about its properties. Although it has worked well in practice, seems
safer to use a well-known algorithm.

Since we're changing the algorithm anyway, we might as well choose a
different polynomial. The Castagnoli polynomial has better error-correcting
properties than the traditional CRC-32 polynomial, even if we had
implemented it correctly. Another reason for picking that is that some new
CPUs have hardware support for calculating CRC-32C, but not CRC-32, let
alone our strange variant of it. This patch doesn't add any support for such
hardware, but a future patch could now do that.

The old algorithm is kept around for tsquery and pg_trgm, which use the
values in indexes that need to remain compatible so that pg_upgrade works.
While we're at it, share the old lookup table for CRC-32 calculation
between hstore, ltree and core. They all use the same table, so might as
well.
2014-11-04 11:39:48 +02:00
..
data
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
_ltree_gist.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
_ltree_op.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
crc32.c Switch to CRC-32C in WAL and other places. 2014-11-04 11:39:48 +02: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_gist.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04: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
ltree--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04: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 Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:31 -05:00
ltreetest.sql Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
ltxtquery_io.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
ltxtquery_op.c Remove unreachable code 2012-07-16 22:15:03 +03:00
Makefile Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00