~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/postgres_ext.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 * $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.16 2004-08-29 05:06:55 momjian Exp $
 
19
 *
 
20
 *-------------------------------------------------------------------------
 
21
 */
 
22
 
 
23
#ifndef POSTGRES_EXT_H
 
24
#define POSTGRES_EXT_H
 
25
 
 
26
/*
 
27
 * Object ID is a fundamental type in Postgres.
 
28
 */
 
29
typedef unsigned int Oid;
 
30
 
 
31
#ifdef __cplusplus
 
32
#define InvalidOid              (Oid(0))
 
33
#else
 
34
#define InvalidOid              ((Oid) 0)
 
35
#endif
 
36
 
 
37
#define OID_MAX  UINT_MAX
 
38
/* you will need to include <limits.h> to use the above #define */
 
39
 
 
40
 
 
41
/*
 
42
 * NAMEDATALEN is the max length for system identifiers (e.g. table names,
 
43
 * attribute names, function names, etc).  It must be a multiple of
 
44
 * sizeof(int) (typically 4).
 
45
 *
 
46
 * NOTE that databases with different NAMEDATALEN's cannot interoperate!
 
47
 */
 
48
#define NAMEDATALEN 64
 
49
 
 
50
 
 
51
/*
 
52
 * Identifiers of error message fields.  Kept here to keep common
 
53
 * between frontend and backend, and also to export them to libpq
 
54
 * applications.
 
55
 */
 
56
#define PG_DIAG_SEVERITY                'S'
 
57
#define PG_DIAG_SQLSTATE                'C'
 
58
#define PG_DIAG_MESSAGE_PRIMARY 'M'
 
59
#define PG_DIAG_MESSAGE_DETAIL  'D'
 
60
#define PG_DIAG_MESSAGE_HINT    'H'
 
61
#define PG_DIAG_STATEMENT_POSITION 'P'
 
62
#define PG_DIAG_INTERNAL_POSITION 'p'
 
63
#define PG_DIAG_INTERNAL_QUERY  'q'
 
64
#define PG_DIAG_CONTEXT                 'W'
 
65
#define PG_DIAG_SOURCE_FILE             'F'
 
66
#define PG_DIAG_SOURCE_LINE             'L'
 
67
#define PG_DIAG_SOURCE_FUNCTION 'R'
 
68
 
 
69
#endif