PostgreSQL Source Code git master
plpython.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * plpython.h - Python as a procedural language for PostgreSQL
4 *
5 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
7 *
8 * src/pl/plpython/plpython.h
9 *
10 *-------------------------------------------------------------------------
11 */
12#ifndef PLPYTHON_H
13#define PLPYTHON_H
14
15/* postgres.h needs to be included before Python.h, as usual */
16#if !defined(POSTGRES_H)
17#error postgres.h must be included before plpython.h
18#elif defined(Py_PYTHON_H)
19#error Python.h must be included via plpython.h
20#endif
21
22/*
23 * Enable Python Limited API
24 *
25 * XXX currently not enabled on MSVC because of build failures
26 */
27#if !defined(_MSC_VER)
28#define Py_LIMITED_API 0x03020000
29#endif
30
31/*
32 * Pull in Python headers via a wrapper header, to control the scope of
33 * the system_header pragma therein.
34 */
35#include "plpython_system.h"
36
37/* define our text domain for translations */
38#undef TEXTDOMAIN
39#define TEXTDOMAIN PG_TEXTDOMAIN("plpython")
40
41/*
42 * Used throughout, so it's easier to just include it everywhere.
43 */
44#include "plpy_util.h"
45
46#endif /* PLPYTHON_H */