mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-13 23:49:34 +02:00
49bff412ed
Other header files should never #include postgres.h (nor postgres_fe.h, nor c.h), per project policy. Also, there's no need for any backend .c file to explicitly include elog.h or palloc.h, because postgres.h pulls those in already. Extracted from a larger patch by Kyotaro Horiguchi. The rest of the removals he suggests require more study, but these are no-brainers. Discussion: https://postgr.es/m/20180215.200447.209320006.horiguchi.kyotaro@lab.ntt.co.jp
26 lines
839 B
C
26 lines
839 B
C
/*
|
|
* src/pl/plpython/plpy_spi.h
|
|
*/
|
|
|
|
#ifndef PLPY_SPI_H
|
|
#define PLPY_SPI_H
|
|
|
|
#include "utils/resowner.h"
|
|
|
|
extern PyObject *PLy_spi_prepare(PyObject *self, PyObject *args);
|
|
extern PyObject *PLy_spi_execute(PyObject *self, PyObject *args);
|
|
extern PyObject *PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit);
|
|
|
|
typedef struct PLyExceptionEntry
|
|
{
|
|
int sqlstate; /* hash key, must be first */
|
|
PyObject *exc; /* corresponding exception */
|
|
} PLyExceptionEntry;
|
|
|
|
/* handling of SPI operations inside subtransactions */
|
|
extern void PLy_spi_subtransaction_begin(MemoryContext oldcontext, ResourceOwner oldowner);
|
|
extern void PLy_spi_subtransaction_commit(MemoryContext oldcontext, ResourceOwner oldowner);
|
|
extern void PLy_spi_subtransaction_abort(MemoryContext oldcontext, ResourceOwner oldowner);
|
|
|
|
#endif /* PLPY_SPI_H */
|