forked from tada/pljava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSPI.h
More file actions
52 lines (41 loc) · 1.17 KB
/
Copy pathSPI.h
File metadata and controls
52 lines (41 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* Copyright (c) 2004, 2005, 2006 TADA AB - Taby Sweden
* Distributed under the terms shown in the file COPYRIGHT
* found in the root folder of this project or at
* http://eng.tada.se/osprojects/COPYRIGHT.html
*
* @author Thomas Hallgren
*/
#ifndef __pljava_SPI_h
#define __pljava_SPI_h
#include "pljava/PgObject.h"
#include <executor/spi.h>
#ifdef __cplusplus
extern "C" {
#endif
/***********************************************************************
* Some needed additions to the SPI set of functions.
*
* @author Thomas Hallgren
*
***********************************************************************/
typedef struct
{
SubTransactionId xid;
int nestingLevel;
char name[1];
} Savepoint;
/* infant is set to the savepoint that is being created durin a setSavepoint call.
* It is used by the onStart callback.
*/
extern Savepoint* infant;
extern Savepoint* SPI_setSavepoint(const char* name);
extern void SPI_releaseSavepoint(Savepoint* sp);
extern void SPI_rollbackSavepoint(Savepoint* sp);
#if (PGSQL_MAJOR_VER == 8 && PGSQL_MINOR_VER < 1)
extern char* SPI_getnspname(Relation rel);
#endif
#ifdef __cplusplus
} /* end of extern "C" declaration */
#endif
#endif