PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
f
h
i
n
o
p
r
s
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
plpython_system.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* plpython_system.h - pull in Python's system header files
4
*
5
* We break this out as a separate header file to precisely control
6
* the scope of the "system_header" pragma. No Postgres-specific
7
* declarations should be put here. However, we do include some stuff
8
* that is meant to prevent conflicts between our code and Python.
9
*
10
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
11
* Portions Copyright (c) 1994, Regents of the University of California
12
*
13
* src/pl/plpython/plpython_system.h
14
*
15
*-------------------------------------------------------------------------
16
*/
17
#ifndef PLPYTHON_SYSTEM_H
18
#define PLPYTHON_SYSTEM_H
19
20
/*
21
* Newer versions of the Python headers trigger a lot of warnings with our
22
* preferred compiler flags (at least -Wdeclaration-after-statement is known
23
* to be problematic). The system_header pragma hides warnings from within
24
* the rest of this file, if supported.
25
*/
26
#ifdef HAVE_PRAGMA_GCC_SYSTEM_HEADER
27
#pragma GCC system_header
28
#endif
29
30
/*
31
* Python versions <= 3.8 otherwise define a replacement, causing macro
32
* redefinition warnings.
33
*/
34
#define HAVE_SNPRINTF 1
35
36
#if defined(_MSC_VER) && defined(_DEBUG)
37
/* Python uses #pragma to bring in a non-default libpython on VC++ if
38
* _DEBUG is defined */
39
#undef _DEBUG
40
/* Also hide away errcode, since we load Python.h before postgres.h */
41
#define errcode __msvc_errcode
42
#include <Python.h>
43
#undef errcode
44
#define _DEBUG
45
#elif defined (_MSC_VER)
46
#define errcode __msvc_errcode
47
#include <Python.h>
48
#undef errcode
49
#else
50
#include <Python.h>
51
#endif
52
53
#endif
/* PLPYTHON_SYSTEM_H */
src
pl
plpython
plpython_system.h
Generated on Thu Jan 23 2025 06:13:26 for PostgreSQL Source Code by
1.9.4