PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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#define Py_LIMITED_API 0x03020000
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#endif /* PLPYTHON_H */