Move pg_crc.c to src/common, and remove pg_crc_tables.h
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Move pg_crc.c to src/common, and remove pg_crc_tables.h To get CRC functionality in a client program, you now need to link with libpgcommon instead of libpgport. The CRC code has nothing to do with portability, so libpgcommon is a better home. (libpgcommon didn't exist when pg_crc.c was originally moved to src/port.) Remove the possibility to get CRC functionality by just #including pg_crc_tables.h. I'm not aware of any extensions that actually did that and couldn't simply link with libpgcommon. This also moves the pg_crc.h header file from src/include/utils to src/include/common, which will require changes to any external programs that currently does #include "utils/pg_crc.h". That seems acceptable, as include/common is clearly the right home for it now, and the change needed to any such programs is trivial.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore/hstore_gist.c | modified | +1 −1 |
| contrib/ltree/crc32.c | modified | +1 −1 |
| src/backend/utils/adt/tsquery.c | modified | +1 −0 |
| src/common/Makefile | modified | +1 −1 |
| src/common/pg_crc.c (from src/include/utils/pg_crc_tables.h) | renamed | +10 −15 |
| src/include/access/xlogrecord.h | modified | +1 −1 |
| src/include/catalog/pg_control.h | modified | +1 −1 |
| src/include/common/pg_crc.h (from src/include/utils/pg_crc.h) | renamed | +1 −1 |
| src/include/tsearch/ts_type.h | modified | +0 −1 |
| src/port/Makefile | modified | +1 −1 |
| src/port/pg_crc.c | deleted | +0 −21 |