PostgreSQL Source Code: src/include/fmgr.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18#ifndef FMGR_H

19#define FMGR_H

20

21

24

25

27

28

30

31

32

33

34

35

36

37

39

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

57{

59 Oid fn_oid;

60 short fn_nargs;

61 bool fn_strict;

62 bool fn_retset;

63 unsigned char fn_stats;

64 void *fn_extra;

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

86{

91#define FIELDNO_FUNCTIONCALLINFODATA_ISNULL 4

92 bool isnull;

93 short nargs;

94#define FIELDNO_FUNCTIONCALLINFODATA_ARGS 6

97

98

99

100

101

102#define SizeForFunctionCallInfo(nargs) \

103 (offsetof(FunctionCallInfoBaseData, args) + \

104 sizeof(NullableDatum) * (nargs))

105

106

107

108

109

110#define LOCAL_FCINFO(name, nargs) \

111 \

112 union \

113 { \

114 FunctionCallInfoBaseData fcinfo; \

115 \

116 char fcinfo_data[SizeForFunctionCallInfo(nargs)]; \

117 } name##data; \

118 FunctionCallInfo name = &name##data.fcinfo

119

120

121

122

123

125

126

127

128

129

130

133

134

135#define fmgr_info_set_expr(expr, finfo) \

136 ((finfo)->fn_expr = (expr))

137

138

139

140

143

144extern void fmgr_symbol(Oid functionId, char **mod, char **fn);

145

146

147

148

149

150#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo) \

151 do { \

152 (Fcinfo).flinfo = (Flinfo); \

153 (Fcinfo).context = (Context); \

154 (Fcinfo).resultinfo = (Resultinfo); \

155 (Fcinfo).fncollation = (Collation); \

156 (Fcinfo).isnull = false; \

157 (Fcinfo).nargs = (Nargs); \

158 } while (0)

159

160

161

162

163

164

165

166

167

168

169

170

171

172#define FunctionCallInvoke(fcinfo) ((* (fcinfo)->flinfo->fn_addr) (fcinfo))

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193#define PG_FUNCTION_ARGS FunctionCallInfo fcinfo

194

195

196

197

198#define PG_GET_COLLATION() (fcinfo->fncollation)

199

200

201

202

203#define PG_NARGS() (fcinfo->nargs)

204

205

206

207

208

209#define PG_ARGISNULL(n) (fcinfo->args[n].isnull)

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

239

240#define PG_DETOAST_DATUM(datum) \

241 pg_detoast_datum((struct varlena *) DatumGetPointer(datum))

242#define PG_DETOAST_DATUM_COPY(datum) \

243 pg_detoast_datum_copy((struct varlena *) DatumGetPointer(datum))

244#define PG_DETOAST_DATUM_SLICE(datum,f,c) \

245 pg_detoast_datum_slice((struct varlena *) DatumGetPointer(datum), \

246 (int32) (f), (int32) (c))

247

248#define PG_DETOAST_DATUM_PACKED(datum) \

249 pg_detoast_datum_packed((struct varlena *) DatumGetPointer(datum))

250

251

252

253

254

255

256

257

258

259

260#define PG_FREE_IF_COPY(ptr,n) \

261 do { \

262 if ((Pointer) (ptr) != PG_GETARG_POINTER(n)) \

263 pfree(ptr); \

264 } while (0)

265

266

267

268#define PG_GETARG_DATUM(n) (fcinfo->args[n].value)

269#define PG_GETARG_INT32(n) DatumGetInt32(PG_GETARG_DATUM(n))

270#define PG_GETARG_UINT32(n) DatumGetUInt32(PG_GETARG_DATUM(n))

271#define PG_GETARG_INT16(n) DatumGetInt16(PG_GETARG_DATUM(n))

272#define PG_GETARG_UINT16(n) DatumGetUInt16(PG_GETARG_DATUM(n))

273#define PG_GETARG_CHAR(n) DatumGetChar(PG_GETARG_DATUM(n))

274#define PG_GETARG_BOOL(n) DatumGetBool(PG_GETARG_DATUM(n))

275#define PG_GETARG_OID(n) DatumGetObjectId(PG_GETARG_DATUM(n))

276#define PG_GETARG_POINTER(n) DatumGetPointer(PG_GETARG_DATUM(n))

277#define PG_GETARG_CSTRING(n) DatumGetCString(PG_GETARG_DATUM(n))

278#define PG_GETARG_NAME(n) DatumGetName(PG_GETARG_DATUM(n))

279#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))

280

281#define PG_GETARG_FLOAT4(n) DatumGetFloat4(PG_GETARG_DATUM(n))

282#define PG_GETARG_FLOAT8(n) DatumGetFloat8(PG_GETARG_DATUM(n))

283#define PG_GETARG_INT64(n) DatumGetInt64(PG_GETARG_DATUM(n))

284

285#define PG_GETARG_RAW_VARLENA_P(n) ((struct varlena *) PG_GETARG_POINTER(n))

286

287#define PG_GETARG_VARLENA_P(n) PG_DETOAST_DATUM(PG_GETARG_DATUM(n))

288

289#define PG_GETARG_VARLENA_PP(n) PG_DETOAST_DATUM_PACKED(PG_GETARG_DATUM(n))

290

291#define DatumGetByteaPP(X) ((bytea *) PG_DETOAST_DATUM_PACKED(X))

292#define DatumGetTextPP(X) ((text *) PG_DETOAST_DATUM_PACKED(X))

293#define DatumGetBpCharPP(X) ((BpChar *) PG_DETOAST_DATUM_PACKED(X))

294#define DatumGetVarCharPP(X) ((VarChar *) PG_DETOAST_DATUM_PACKED(X))

295#define DatumGetHeapTupleHeader(X) ((HeapTupleHeader) PG_DETOAST_DATUM(X))

296

297#define DatumGetByteaPCopy(X) ((bytea *) PG_DETOAST_DATUM_COPY(X))

298#define DatumGetTextPCopy(X) ((text *) PG_DETOAST_DATUM_COPY(X))

299#define DatumGetBpCharPCopy(X) ((BpChar *) PG_DETOAST_DATUM_COPY(X))

300#define DatumGetVarCharPCopy(X) ((VarChar *) PG_DETOAST_DATUM_COPY(X))

301#define DatumGetHeapTupleHeaderCopy(X) ((HeapTupleHeader) PG_DETOAST_DATUM_COPY(X))

302

303#define DatumGetByteaPSlice(X,m,n) ((bytea *) PG_DETOAST_DATUM_SLICE(X,m,n))

304#define DatumGetTextPSlice(X,m,n) ((text *) PG_DETOAST_DATUM_SLICE(X,m,n))

305#define DatumGetBpCharPSlice(X,m,n) ((BpChar *) PG_DETOAST_DATUM_SLICE(X,m,n))

306#define DatumGetVarCharPSlice(X,m,n) ((VarChar *) PG_DETOAST_DATUM_SLICE(X,m,n))

307

308#define PG_GETARG_BYTEA_PP(n) DatumGetByteaPP(PG_GETARG_DATUM(n))

309#define PG_GETARG_TEXT_PP(n) DatumGetTextPP(PG_GETARG_DATUM(n))

310#define PG_GETARG_BPCHAR_PP(n) DatumGetBpCharPP(PG_GETARG_DATUM(n))

311#define PG_GETARG_VARCHAR_PP(n) DatumGetVarCharPP(PG_GETARG_DATUM(n))

312#define PG_GETARG_HEAPTUPLEHEADER(n) DatumGetHeapTupleHeader(PG_GETARG_DATUM(n))

313

314#define PG_GETARG_BYTEA_P_COPY(n) DatumGetByteaPCopy(PG_GETARG_DATUM(n))

315#define PG_GETARG_TEXT_P_COPY(n) DatumGetTextPCopy(PG_GETARG_DATUM(n))

316#define PG_GETARG_BPCHAR_P_COPY(n) DatumGetBpCharPCopy(PG_GETARG_DATUM(n))

317#define PG_GETARG_VARCHAR_P_COPY(n) DatumGetVarCharPCopy(PG_GETARG_DATUM(n))

318#define PG_GETARG_HEAPTUPLEHEADER_COPY(n) DatumGetHeapTupleHeaderCopy(PG_GETARG_DATUM(n))

319

320#define PG_GETARG_BYTEA_P_SLICE(n,a,b) DatumGetByteaPSlice(PG_GETARG_DATUM(n),a,b)

321#define PG_GETARG_TEXT_P_SLICE(n,a,b) DatumGetTextPSlice(PG_GETARG_DATUM(n),a,b)

322#define PG_GETARG_BPCHAR_P_SLICE(n,a,b) DatumGetBpCharPSlice(PG_GETARG_DATUM(n),a,b)

323#define PG_GETARG_VARCHAR_P_SLICE(n,a,b) DatumGetVarCharPSlice(PG_GETARG_DATUM(n),a,b)

324

325

326

327

328

329

330

331#define DatumGetByteaP(X) ((bytea *) PG_DETOAST_DATUM(X))

332#define DatumGetTextP(X) ((text *) PG_DETOAST_DATUM(X))

333#define DatumGetBpCharP(X) ((BpChar *) PG_DETOAST_DATUM(X))

334#define DatumGetVarCharP(X) ((VarChar *) PG_DETOAST_DATUM(X))

335#define PG_GETARG_BYTEA_P(n) DatumGetByteaP(PG_GETARG_DATUM(n))

336#define PG_GETARG_TEXT_P(n) DatumGetTextP(PG_GETARG_DATUM(n))

337#define PG_GETARG_BPCHAR_P(n) DatumGetBpCharP(PG_GETARG_DATUM(n))

338#define PG_GETARG_VARCHAR_P(n) DatumGetVarCharP(PG_GETARG_DATUM(n))

339

340

341#define PG_HAS_OPCLASS_OPTIONS() has_fn_opclass_options(fcinfo->flinfo)

342#define PG_GET_OPCLASS_OPTIONS() get_fn_opclass_options(fcinfo->flinfo)

343

344

345#define PG_RETURN_NULL() \

346 do { fcinfo->isnull = true; return (Datum) 0; } while (0)

347

348

349#define PG_RETURN_VOID() return (Datum) 0

350

351

352

353#define PG_RETURN_DATUM(x) return (x)

354#define PG_RETURN_INT32(x) return Int32GetDatum(x)

355#define PG_RETURN_UINT32(x) return UInt32GetDatum(x)

356#define PG_RETURN_INT16(x) return Int16GetDatum(x)

357#define PG_RETURN_UINT16(x) return UInt16GetDatum(x)

358#define PG_RETURN_CHAR(x) return CharGetDatum(x)

359#define PG_RETURN_BOOL(x) return BoolGetDatum(x)

360#define PG_RETURN_OID(x) return ObjectIdGetDatum(x)

361#define PG_RETURN_POINTER(x) return PointerGetDatum(x)

362#define PG_RETURN_CSTRING(x) return CStringGetDatum(x)

363#define PG_RETURN_NAME(x) return NameGetDatum(x)

364#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)

365

366#define PG_RETURN_FLOAT4(x) return Float4GetDatum(x)

367#define PG_RETURN_FLOAT8(x) return Float8GetDatum(x)

368#define PG_RETURN_INT64(x) return Int64GetDatum(x)

369#define PG_RETURN_UINT64(x) return UInt64GetDatum(x)

370

371#define PG_RETURN_BYTEA_P(x) PG_RETURN_POINTER(x)

372#define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x)

373#define PG_RETURN_BPCHAR_P(x) PG_RETURN_POINTER(x)

374#define PG_RETURN_VARCHAR_P(x) PG_RETURN_POINTER(x)

375#define PG_RETURN_HEAPTUPLEHEADER(x) return HeapTupleHeaderGetDatum(x)

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394typedef struct

395{

396 int api_version;

397

399

400

402

403

404

405

406

407

408

409

410

411

412

413

414

415#define PG_FUNCTION_INFO_V1(funcname) \

416extern PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS); \

417extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \

418const Pg_finfo_record * \

419CppConcat(pg_finfo_,funcname) (void) \

420{ \

421 static const Pg_finfo_record my_finfo = { 1 }; \

422 return &my_finfo; \

423} \

424extern int no_such_variable

425

426

427

428

429

430

431

432

433

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466typedef struct

467{

468 int version;

473 char abi_extra[32];

475

476

477typedef struct

478{

479 int len;

481

482 const char *name;

483 const char *version;

485

486

487#define PG_MODULE_ABI_DATA \

488{ \

489 PG_VERSION_NUM / 100, \

490 FUNC_MAX_ARGS, \

491 INDEX_MAX_KEYS, \

492 NAMEDATALEN, \

493 FLOAT8PASSBYVAL, \

494 FMGR_ABI_EXTRA, \

495}

496

497

498

499

500

501#define PG_MODULE_MAGIC_DATA(...) \

502{ \

503 .len = sizeof(Pg_magic_struct), \

504 .abi_fields = PG_MODULE_ABI_DATA, \

505 __VA_ARGS__ \

506}

507

509 "FMGR_ABI_EXTRA too long");

510

511

512

513

514

516

517#define PG_MAGIC_FUNCTION_NAME Pg_magic_func

518#define PG_MAGIC_FUNCTION_NAME_STRING "Pg_magic_func"

519

520#define PG_MODULE_MAGIC \

521extern PGDLLEXPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \

522const Pg_magic_struct * \

523PG_MAGIC_FUNCTION_NAME(void) \

524{ \

525 static const Pg_magic_struct Pg_magic_data = PG_MODULE_MAGIC_DATA(.name = NULL); \

526 return &Pg_magic_data; \

527} \

528extern int no_such_variable

529

530

531

532

533

534

535

536

537

538#define PG_MODULE_MAGIC_EXT(...) \

539extern PGDLLEXPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \

540const Pg_magic_struct * \

541PG_MAGIC_FUNCTION_NAME(void) \

542{ \

543 static const Pg_magic_struct Pg_magic_data = \

544 PG_MODULE_MAGIC_DATA(__VA_ARGS__); \

545 return &Pg_magic_data; \

546} \

547extern int no_such_variable

548

549

550

551

552

553

554

555

556

557

558

559

590

591

592

593

594

595

596

597

598

603

604

605

606

607

639

640

641

642

643

644

645

677

678

679

680

681

682#define DirectFunctionCall1(func, arg1) \

683 DirectFunctionCall1Coll(func, InvalidOid, arg1)

684#define DirectFunctionCall2(func, arg1, arg2) \

685 DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)

686#define DirectFunctionCall3(func, arg1, arg2, arg3) \

687 DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)

688#define DirectFunctionCall4(func, arg1, arg2, arg3, arg4) \

689 DirectFunctionCall4Coll(func, InvalidOid, arg1, arg2, arg3, arg4)

690#define DirectFunctionCall5(func, arg1, arg2, arg3, arg4, arg5) \

691 DirectFunctionCall5Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5)

692#define DirectFunctionCall6(func, arg1, arg2, arg3, arg4, arg5, arg6) \

693 DirectFunctionCall6Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6)

694#define DirectFunctionCall7(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \

695 DirectFunctionCall7Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7)

696#define DirectFunctionCall8(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \

697 DirectFunctionCall8Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

698#define DirectFunctionCall9(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \

699 DirectFunctionCall9Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)

700#define FunctionCall1(flinfo, arg1) \

701 FunctionCall1Coll(flinfo, InvalidOid, arg1)

702#define FunctionCall2(flinfo, arg1, arg2) \

703 FunctionCall2Coll(flinfo, InvalidOid, arg1, arg2)

704#define FunctionCall3(flinfo, arg1, arg2, arg3) \

705 FunctionCall3Coll(flinfo, InvalidOid, arg1, arg2, arg3)

706#define FunctionCall4(flinfo, arg1, arg2, arg3, arg4) \

707 FunctionCall4Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4)

708#define FunctionCall5(flinfo, arg1, arg2, arg3, arg4, arg5) \

709 FunctionCall5Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5)

710#define FunctionCall6(flinfo, arg1, arg2, arg3, arg4, arg5, arg6) \

711 FunctionCall6Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6)

712#define FunctionCall7(flinfo, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \

713 FunctionCall7Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7)

714#define FunctionCall8(flinfo, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \

715 FunctionCall8Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

716#define FunctionCall9(flinfo, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \

717 FunctionCall9Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)

718#define OidFunctionCall0(functionId) \

719 OidFunctionCall0Coll(functionId, InvalidOid)

720#define OidFunctionCall1(functionId, arg1) \

721 OidFunctionCall1Coll(functionId, InvalidOid, arg1)

722#define OidFunctionCall2(functionId, arg1, arg2) \

723 OidFunctionCall2Coll(functionId, InvalidOid, arg1, arg2)

724#define OidFunctionCall3(functionId, arg1, arg2, arg3) \

725 OidFunctionCall3Coll(functionId, InvalidOid, arg1, arg2, arg3)

726#define OidFunctionCall4(functionId, arg1, arg2, arg3, arg4) \

727 OidFunctionCall4Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4)

728#define OidFunctionCall5(functionId, arg1, arg2, arg3, arg4, arg5) \

729 OidFunctionCall5Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5)

730#define OidFunctionCall6(functionId, arg1, arg2, arg3, arg4, arg5, arg6) \

731 OidFunctionCall6Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6)

732#define OidFunctionCall7(functionId, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \

733 OidFunctionCall7Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7)

734#define OidFunctionCall8(functionId, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \

735 OidFunctionCall8Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

736#define OidFunctionCall9(functionId, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \

737 OidFunctionCall9Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)

738

739

740

742 Oid typioparam, int32 typmod);

744 Oid typioparam, int32 typmod,

748 Oid typioparam, int32 typmod,

752 Oid typioparam, int32 typmod);

756 Oid typioparam, int32 typmod);

758 Oid typioparam, int32 typmod);

761

762

763

764

765

778

779

780

781

783

785

787extern char *find_in_path(const char *basename, const char *path, const char *path_param,

788 const char *macro, const char *macro_val);

790 bool signalNotFound, void **filehandle);

796 const char **library_path,

797 const char **module_name,

798 const char **module_version);

803

804

805

806

807

808

809

810

811

812#define AGG_CONTEXT_AGGREGATE 1

813#define AGG_CONTEXT_WINDOW 2

814

823

824

825

826

827

828

829

830

831

832

834{

839

841

844

847

848#define FmgrHookIsNeeded(fn_oid) \

849 (!needs_fmgr_hook ? false : (*needs_fmgr_hook)(fn_oid))

850

851#endif

#define FLEXIBLE_ARRAY_MEMBER

Datum FunctionCall4Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4)

Datum ReceiveFunctionCall(FmgrInfo *flinfo, fmStringInfo buf, Oid typioparam, int32 typmod)

Datum OidFunctionCall2Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2)

bool get_call_expr_arg_stable(fmNodePtr expr, int argnum)

Oid get_call_expr_argtype(fmNodePtr expr, int argnum)

void set_fn_opclass_options(FmgrInfo *flinfo, bytea *options)

Oid fmgr_internal_function(const char *proname)

StaticAssertDecl(sizeof(FMGR_ABI_EXTRA)<=sizeof(((Pg_abi_values *) 0) ->abi_extra), "FMGR_ABI_EXTRA too long")

fmAggrefPtr AggGetAggref(FunctionCallInfo fcinfo)

struct Aggref * fmAggrefPtr

Datum OidFunctionCall9Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8, Datum arg9)

bool get_fn_expr_arg_stable(FmgrInfo *flinfo, int argnum)

struct varlena * pg_detoast_datum_copy(struct varlena *datum)

void AggRegisterCallback(FunctionCallInfo fcinfo, fmExprContextCallbackFunction func, Datum arg)

struct varlena * pg_detoast_datum_slice(struct varlena *datum, int32 first, int32 count)

Datum OidFunctionCall6Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6)

Datum FunctionCall6Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6)

Datum OidFunctionCall5Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5)

void(* fmExprContextCallbackFunction)(Datum arg)

Datum FunctionCall8Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8)

bool CheckFunctionValidatorAccess(Oid validatorOid, Oid functionOid)

void RestoreLibraryState(char *start_address)

bool(* needs_fmgr_hook_type)(Oid fn_oid)

Datum InputFunctionCall(FmgrInfo *flinfo, char *str, Oid typioparam, int32 typmod)

Datum FunctionCall2Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2)

void fmgr_info(Oid functionId, FmgrInfo *finfo)

Datum OidInputFunctionCall(Oid functionId, char *str, Oid typioparam, int32 typmod)

PGDLLIMPORT needs_fmgr_hook_type needs_fmgr_hook

Datum DirectFunctionCall2Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2)

char * find_in_path(const char *basename, const char *path, const char *path_param, const char *macro, const char *macro_val)

struct varlena * pg_detoast_datum_packed(struct varlena *datum)

char * OidOutputFunctionCall(Oid functionId, Datum val)

Datum FunctionCall5Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5)

const Pg_finfo_record * fetch_finfo_record(void *filehandle, const char *funcname)

struct varlena * pg_detoast_datum(struct varlena *datum)

Datum OidFunctionCall3Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3)

struct FunctionCallInfoBaseData * FunctionCallInfo

void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)

Datum OidFunctionCall8Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8)

bytea * SendFunctionCall(FmgrInfo *flinfo, Datum val)

Datum OidFunctionCall4Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4)

void SerializeLibraryState(Size maxsize, char *start_address)

DynamicFileList * get_next_loaded_module(DynamicFileList *dfptr)

Datum DirectFunctionCall4Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4)

void load_file(const char *filename, bool restricted)

Datum OidFunctionCall7Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7)

PGDLLIMPORT fmgr_hook_type fmgr_hook

bool InputFunctionCallSafe(FmgrInfo *flinfo, char *str, Oid typioparam, int32 typmod, fmNodePtr escontext, Datum *result)

void ** find_rendezvous_variable(const char *varName)

PGDLLEXPORT void _PG_init(void)

Size EstimateLibraryStateSpace(void)

bool has_fn_opclass_options(FmgrInfo *flinfo)

void * lookup_external_function(void *filehandle, const char *funcname)

int AggCheckCallContext(FunctionCallInfo fcinfo, MemoryContext *aggcontext)

Datum CallerFInfoFunctionCall2(PGFunction func, FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2)

Datum CallerFInfoFunctionCall1(PGFunction func, FmgrInfo *flinfo, Oid collation, Datum arg1)

Datum DirectFunctionCall6Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6)

Datum DirectFunctionCall5Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5)

PGDLLIMPORT char * Dynamic_library_path

Datum OidFunctionCall1Coll(Oid functionId, Oid collation, Datum arg1)

char * OutputFunctionCall(FmgrInfo *flinfo, Datum val)

bool AggStateIsShared(FunctionCallInfo fcinfo)

bool get_fn_expr_variadic(FmgrInfo *flinfo)

Datum DirectFunctionCall1Coll(PGFunction func, Oid collation, Datum arg1)

DynamicFileList * get_first_loaded_module(void)

Datum OidReceiveFunctionCall(Oid functionId, fmStringInfo buf, Oid typioparam, int32 typmod)

bytea * get_fn_opclass_options(FmgrInfo *flinfo)

Datum FunctionCall3Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3)

void(* fmgr_hook_type)(FmgrHookEventType event, FmgrInfo *flinfo, Datum *arg)

Datum DirectFunctionCall3Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3)

Datum(* PGFunction)(FunctionCallInfo fcinfo)

Datum FunctionCall7Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7)

Oid get_fn_expr_argtype(FmgrInfo *flinfo, int argnum)

void * load_external_function(const char *filename, const char *funcname, bool signalNotFound, void **filehandle)

Datum OidFunctionCall0Coll(Oid functionId, Oid collation)

void fmgr_symbol(Oid functionId, char **mod, char **fn)

Datum DirectFunctionCall9Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8, Datum arg9)

void get_loaded_module_details(DynamicFileList *dfptr, const char **library_path, const char **module_name, const char **module_version)

bytea * OidSendFunctionCall(Oid functionId, Datum val)

Datum FunctionCall1Coll(FmgrInfo *flinfo, Oid collation, Datum arg1)

bool DirectInputFunctionCallSafe(PGFunction func, char *str, Oid typioparam, int32 typmod, fmNodePtr escontext, Datum *result)

Oid get_fn_expr_rettype(FmgrInfo *flinfo)

struct FunctionCallInfoBaseData FunctionCallInfoBaseData

void fmgr_info_copy(FmgrInfo *dstinfo, FmgrInfo *srcinfo, MemoryContext destcxt)

Datum FunctionCall0Coll(FmgrInfo *flinfo, Oid collation)

Datum FunctionCall9Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8, Datum arg9)

Datum DirectFunctionCall7Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7)

char * substitute_path_macro(const char *str, const char *macro, const char *value)

MemoryContext AggGetTempMemoryContext(FunctionCallInfo fcinfo)

struct StringInfoData * fmStringInfo

Datum DirectFunctionCall8Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8)

NullableDatum args[FLEXIBLE_ARRAY_MEMBER]

static void * fn(void *arg)