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 * Note: this file is #include'd by each of the sub-module header files
6 * (plpy_elog.h, etc). It's therefore unnecessary for any plpython *.c
7 * files to include it directly.
8 *
9 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
10 * Portions Copyright (c) 1994, Regents of the University of California
11 *
12 * src/pl/plpython/plpython.h
13 *
14 *-------------------------------------------------------------------------
15 */
16#ifndef PLPYTHON_H
17#define PLPYTHON_H
18
19/* postgres.h needs to be included before Python.h, as usual */
20#if !defined(POSTGRES_H)
21#error postgres.h must be included before plpython.h
22#elif defined(Py_PYTHON_H)
23#error Python.h must be included via plpython.h
24#endif
25
26/*
27 * Enable Python Limited API
28 *
29 * XXX currently not enabled on MSVC because of build failures
30 */
31#if !defined(_MSC_VER)
32#define Py_LIMITED_API 0x03020000
33#endif
34
35/*
36 * Pull in Python headers via a wrapper header, to control the scope of
37 * the system_header pragma therein.
38 */
39#include "plpython_system.h"
40
41/* define our text domain for translations */
42#undef TEXTDOMAIN
43#define TEXTDOMAIN PG_TEXTDOMAIN("plpython")
44
45#endif /* PLPYTHON_H */