Skip to content

Commit c97d8d4

Browse files
committed
Fix crc on 9.5.
1 parent 9ecbabb commit c97d8d4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

jsquery_op.c

+8-7
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616

1717
#include "miscadmin.h"
1818
#include "utils/builtins.h"
19-
#if PG_VERSION_NUM >= 90500
20-
#include "common/pg_crc.h"
21-
#define COMP_CRC32 COMP_CRC32C
22-
#define INIT_CRC32 INIT_CRC32C
23-
#define FIN_CRC32 FIN_CRC32C
24-
#define INIT_CRC32 INIT_CRC32C
25-
#else
2619
#include "utils/pg_crc.h"
20+
#if PG_VERSION_NUM >= 90500
21+
/*
22+
* We have to keep same checksum algorithm as in pre-9.5 in order to be
23+
* pg_upgradeable.
24+
*/
25+
#define INIT_CRC32 INIT_LEGACY_CRC32
26+
#define FIN_CRC32 FIN_LEGACY_CRC32
27+
#define COMP_CRC32 COMP_LEGACY_CRC32
2728
#endif
2829

2930
#include "jsquery.h"

0 commit comments

Comments
 (0)