MobilityDB 1.1
postgres_ext.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * postgres_ext.h
4 *
5 * This file contains declarations of things that are visible everywhere
6 * in PostgreSQL *and* are visible to clients of frontend interface libraries.
7 * For example, the Oid type is part of the API of libpq and other libraries.
8 *
9 * Declarations which are specific to a particular interface should
10 * go in the header file for that interface (such as libpq-fe.h). This
11 * file is only for fundamental Postgres declarations.
12 *
13 * User-written C functions don't count as "external to Postgres."
14 * Those function much as local modifications to the backend itself, and
15 * use header files that are otherwise internal to Postgres to interface
16 * with the backend.
17 *
18 * src/include/postgres_ext.h
19 *
20 *-------------------------------------------------------------------------
21 */
22
23#ifndef POSTGRES_EXT_H
24#define POSTGRES_EXT_H
25
26#include "pg_config_ext.h"
27
28/*
29 * Object ID is a fundamental type in Postgres.
30 */
31typedef unsigned int Oid;
32
33#ifdef __cplusplus
34#define InvalidOid (Oid(0))
35#else
36#define InvalidOid ((Oid) 0)
37#endif
38
39#define OID_MAX UINT_MAX
40/* you will need to include <limits.h> to use the above #define */
41
42#define atooid(x) ((Oid) strtoul((x), NULL, 10))
43/* the above needs <stdlib.h> */
44
45
46/* Define a signed 64-bit integer type for use in client API declarations. */
48
49
50#endif /* POSTGRES_EXT_H */
#define PG_INT64_TYPE
Definition: pg_config.h:814
PG_INT64_TYPE pg_int64
Definition: postgres_ext.h:47
unsigned int Oid
Definition: postgres_ext.h:31