28#ifndef COMPATIBILITY_H
29#define COMPATIBILITY_H
32#include "nodes/pg_list.h"
33#include "catalog/namespace.h"
48#if PG_VERSION_NUM >= 130000
49 return list_delete_cell(list, cell);
51 return list_delete_cell(list, cell, prev);
66static inline ListCell *
my_lnext(
const List *l,
const ListCell *c)
68#if PG_VERSION_NUM >= 130000
84static inline FuncCandidateList
86 bool expand_variadic,
bool expand_defaults,
87 bool include_out_arguments,
bool missing_ok)
89#if PG_VERSION_NUM >= 190000
91 return FuncnameGetCandidates(names, nargs, argnames, expand_variadic,
92 expand_defaults, include_out_arguments,
93 missing_ok, &fgc_flags);
94#elif PG_VERSION_NUM >= 140000
95 return FuncnameGetCandidates(names, nargs, argnames, expand_variadic,
96 expand_defaults, include_out_arguments,
99 return FuncnameGetCandidates(names, nargs, argnames, expand_variadic,
100 expand_defaults, missing_ok);
111static inline FuncCandidateList
114#if PG_VERSION_NUM >= 190000
116 return OpernameGetCandidates(names, oprkind, missing_schema_ok, &fgc_flags);
118 return OpernameGetCandidates(names, oprkind, missing_schema_ok);
122#if PG_VERSION_NUM < 130000
139#if PG_VERSION_NUM < 140000
141#define F_COUNT_ANY 2147
145#define F_SUM_INT4 2108
148#if PG_VERSION_NUM >= 130000 && PG_VERSION_NUM < 140000
152#define list_make5(x1, x2, x3, x4, x5) lappend(list_make4(x1, x2, x3, x4), x5)
155#if PG_VERSION_NUM < 130000
160#define TYPALIGN_INT 'i'
161#define TYPALIGN_CHAR 'c'
164#if PG_VERSION_NUM < 140000
170#define F_ARRAY_AGG_ANYNONARRAY 2335
static List * my_list_delete_cell(List *list, ListCell *cell, ListCell *prev)
Version-agnostic wrapper around list_delete_cell().
static ListCell * my_lnext(const List *l, const ListCell *c)
Version-agnostic wrapper around lnext().
static FuncCandidateList OpernameGetCandidatesCompat(List *names, char oprkind, bool missing_schema_ok)
Version-agnostic wrapper around OpernameGetCandidates().
static FuncCandidateList FuncnameGetCandidatesCompat(List *names, int nargs, List *argnames, bool expand_variadic, bool expand_defaults, bool include_out_arguments, bool missing_ok)
Version-agnostic wrapper around FuncnameGetCandidates().
List * list_insert_nth(List *list, int pos, void *datum)
Insert datum at position pos in list (PG < 13 backport).