Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 10b0f02

Browse files
author
Nikita Glukhov
committed
Add v11 compatibility macros
1 parent 40511f7 commit 10b0f02

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/include/utils/jsonb.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ typedef enum
7070
#define PG_GETARG_JSONB(x) DatumGetJsonb(PG_GETARG_DATUM(x))
7171
#define PG_RETURN_JSONB(x) PG_RETURN_POINTER(x)
7272

73+
/* v11 compatibility macros */
74+
#ifndef DatumGetJsonbP
75+
# define DatumGetJsonbP(d) DatumGetJsonb(d)
76+
# define JsonbPGetDatum(p) PointerGetDatum(p)
77+
# define PG_GETARG_JSONB_P(x) DatumGetJsonbP(PG_GETARG_DATUM(x))
78+
# define PG_RETURN_JSONB_P(x) PG_RETURN_POINTER(x)
79+
#endif
80+
7381
typedef struct JsonbPair JsonbPair;
7482
typedef struct JsonbValue JsonbValue;
7583

0 commit comments

Comments
 (0)