Dodge a macro-name conflict with Perl.
Tom Lane <tgl@sss.pgh.pa.us>
Dodge a macro-name conflict with Perl. Some versions of Perl export a macro named HS_KEY. This creates a conflict in contrib/hstore_plperl against hstore's macro of the same name. The most future-proof solution seems to be to rename our macro; I chose HSTORE_KEY. For consistency, rename HS_VAL and related macros similarly. Back-patch to 9.5. contrib/hstore_plperl doesn't exist before that so there is no need to worry about the conflict in older releases. Per reports from Marco Atzeri and Mike Blackwell.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore/hstore_compat.c | modified | +1 −1 |
| contrib/hstore/hstore_gin.c | modified | +5 −3 |
| contrib/hstore/hstore_gist.c | modified | +10 −6 |
| contrib/hstore/hstore.h | modified | +5 −5 |
| contrib/hstore/hstore_io.c | modified | +46 −37 |
| contrib/hstore/hstore_op.c | modified | +76 −72 |
| contrib/hstore_plperl/hstore_plperl.c | modified | +5 −2 |
| contrib/hstore_plpython/hstore_plpython.c | modified | +5 −3 |