config.h 6.6 KB
Newer Older
M
Marc G. Fournier 已提交
1
/* the purpose of this file is to reduce the use of #ifdef's through
M
Marc G. Fournier 已提交
2 3 4
 * the code base by those porting the software, an dto facilitate the
 * eventual use of autoconf to build the server 
 */
M
Marc G. Fournier 已提交
5

6 7 8
#ifndef CONFIG_H
#define CONFIG_H

9 10
#define BLCKSZ	8192

M
Marc G. Fournier 已提交
11 12 13 14 15
/* Found in catalog/catalog.c, but doesn't seem to do anything in there */
#ifndef MAXPATHLEN
#define MAXPATHLEN      80
#endif

16 17
#define HAVE_MEMMOVE

18
#if defined(sequent) 
19 20 21
#  define NEED_UNION_SEMUN 
#endif

22
#if defined(alpha)
23 24 25 26 27 28 29
#  define USE_POSIX_TIME 
#  define DISABLE_XOPEN_NLS 
#  define NEED_ISINF 
#  define HAS_LONG_LONG
#  define NEED_UNION_SEMUN 
#endif

30
#if defined(dgux)
31 32 33 34
#  define LINUX_ELF
#  define NEED_UNION_SEMUN 
#endif

35
#if defined(ultrix4)
36 37 38
#  define NEED_ISINF 
#  define USE_POSIX_TIME
#  define NEED_UNION_SEMUN 
39 40
#endif

41
#if defined(linux)
M
Marc G. Fournier 已提交
42 43 44
#  ifndef __USE_POSIX
#    define __USE_POSIX
#  endif
45 46 47
#  define NEED_CBRT
#endif

48
#if defined(hpux)
49
#  define USE_POSIX_TIME
50
#  define HAVE_TZSET
51 52
#  define NEED_CBRT
#  define NEED_RINT
53
#  define NEED_UNION_SEMUN 
54 55
#endif

56
#if defined(i386_solaris) 
57 58 59 60
#  define USE_POSIX_TIME 
#  define NEED_ISINF 
#  define NEED_RUSAGE 
#  define NO_EMPTY_STMTS
61
#  define HAVE_TZSET
62 63 64
#  define NEED_UNION_SEMUN 
#endif

65
#if defined(sparc)
66
#  define USE_POSIX_TIME
67
#  undef HAVE_MEMMOVE
68 69
#endif

70
#if defined(sparc_solaris)
71 72 73 74 75
#  define USE_POSIX_TIME 
#  define NEED_ISINF 
#  define NEED_RUSAGE 
#  define NO_EMPTY_STMTS
#  define USE_POSIX_TIME
76
#  define HAVE_TZSET
77
#  define NEED_UNION_SEMUN 
78 79
#endif

80
#if defined(svr4) 
81 82 83 84
#  define USE_POSIX_TIME 
#  define NEED_ISINF 
#  define NEED_RUSAGE 
#  define NO_EMPTY_STMTS
85
#  define HAVE_TZSET
86
#  define NEED_UNION_SEMUN 
87
#endif
88

89
#if defined(next)
M
Marc G. Fournier 已提交
90 91 92
#  define NEED_SIG_JMP
#endif

93
#if defined(win32)
M
Marc G. Fournier 已提交
94
#  define NEED_SIG_JMP
95 96
#  define NO_UNISTD_H
#  define USES_WINSOCK 
97
#  define NOFILE	100
98
#  define NEED_UNION_SEMUN
99
#  define HAVE_TZSET
100 101
#  define NEED_CBRT
#  define NEED_ISINF
102
#endif /* WIN32 */
M
Marc G. Fournier 已提交
103

104
#if defined(BSD44_derived) || \
B
Bruce Momjian 已提交
105
    defined(bsdi)
106 107 108
#  define USE_LIMITS_H
#  define USE_POSIX_TIME
#  define NEED_CBRT
B
Bruce Momjian 已提交
109 110 111
#  ifdef PRE_BSDI_2_1
#    define NEED_UNION_SEMUN 
#  endif
112 113
#endif

114
#if defined(aix)
115 116 117 118
#  define CLASS_CONFLICT 
#  define DISABLE_XOPEN_NLS 
#  define NEED_ISINF
#  define NEED_UNION_SEMUN 
119
#  define NEED_SYS_SELECT_H
120
#  define HAVE_TZSET
121 122
#endif

123
#if defined(irix5)
124 125 126
#  define USE_POSIX_TIME 
#  define NEED_ISINF 
#  define NO_EMPTY_STMTS
127
#  define NO_VFORK
128
#  define HAVE_TZSET
129
#endif
M
Marc G. Fournier 已提交
130

131
/*
M
Marc G. Fournier 已提交
132 133 134 135 136 137
 * The following is used as the arg list for signal handlers.  Any ports
 * that take something other than an int argument should change this in
 * the port specific makefile.  Note that variable names are required
 * because it is used in both the prototypes as well as the definitions.
 * Note also the long name.  We expect that this won't collide with
 * other names causing compiler warnings.
138
 */ 
M
Marc G. Fournier 已提交
139

140
#ifndef       SIGNAL_ARGS
141
#  define SIGNAL_ARGS int postgres_signal_arg
142
#endif
143

144 145 146 147 148 149 150 151 152 153
/* NAMEDATALEN is the max length for system identifiers (e.g. table names,
 * attribute names, function names, etc.)
 *
 * These MUST be set here.  DO NOT COMMENT THESE OUT
 * Setting these too high will result in excess space usage for system catalogs
 * Setting them too low will make the system unusable.
 * values between 16 and 64 that are multiples of four are recommended.
 *
 * NOTE also that databases with different NAMEDATALEN's cannot interoperate!
 */ 
154
#define NAMEDATALEN 32
155
/* OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid) */
156 157
#define OIDNAMELEN  36

158 159 160
/* turn this on if you prefer European style dates instead of American
 * style dates
 */
161
/* #define EUROPEAN_DATES  */
162 163 164 165 166 167 168

/*
 * If you do not plan to use Host based authentication,
 * comment out the following line
 */
#define HBA

169 170 171 172 173 174 175
/*
 * On architectures for which we have not implemented spinlocks (or
 * cannot do so), we use System V semaphores.  We also use them for
 * long locks.  For some reason union semun is never defined in the
 * System V header files so we must do it ourselves.
 */

176 177 178 179 180 181 182
/*  Debug and various "defines" that should be documented */

/* found in function aclparse() in src/backend/utils/adt/acl.c */
/* #define ACLDEBUG */

/* found in src/backend/utils/adt/arrayfuncs.c */
/* #define LOARRAY */
183 184 185 186 187 188 189 190 191 192

/* This is the time, in seconds, at which a given backend server
 * will wait on a lock before deciding to abort the transaction
 * (this is what we do in lieu of deadlock detection).
 *
 * Low numbers are not recommended as they will tend to cause
 * false aborts if many transactions are long-lived.
 */
#define DEADLOCK_TIMEOUT 60

193

194
#define INDEXSCAN_PATCH 
195 196 197 198 199 200

/* #define DATEDEBUG */

/* #define USE_SHORT_YEAR */
/* #define AMERICAN_STYLE */

201 202 203 204
/*
 * defining unsafe floats's will make float4 and float8
 * ops faster at the cost of safety, of course!        
 */
205 206
/* #define UNSAFE_FLOATS */

207
/*
208 209 210 211 212 213 214
 * There is a bug in the function executor. The backend crashes while trying to
 * execute an sql function containing an utility command (create, notify, ...).
 * The bug is part in the planner, which returns a number of plans different
 * than the number of commands if there are utility commands in the query, and
 * in part in the function executor which assumes that all commands are normal
 * query commands and causes a SIGSEGV trying to execute commands without plan.
 */
215 216
#define FUNC_UTIL_PATCH

217
/*
218 219 220 221 222 223 224 225 226 227 228 229 230 231
 * Async notifies received while a backend is in the middle of a begin/end
 * transaction block are lost by libpq when the final end command is issued.
 * 
 * The bug is in the routine PQexec of libpq. The routine throws away any
 * message from the backend when a message of type 'C' is received. This
 * type of message is sent when the result of a portal query command with
 * no tuples is returned. Unfortunately this is the case of the end command.
 * As all async notification are sent only when the transaction is finished,
 * if they are received in the middle of a transaction they are lost in the
 * libpq library. I added some tracing code to PQexec and this is the output:
 */
#define PQ_NOTIFY_PATCH

/* Debug #defines */
232 233 234 235 236 237 238 239
/* #define IPORTAL_DEBUG  */
/* #define HEAPDEBUGALL  */
/* #define ISTRATDEBUG  */
/* #define FASTBUILD_DEBUG */
#define RTDEBUG 
#define GISTDEBUG 
/* #define PURGEDEBUG */
/* #define DEBUG_RECIPE */
240 241 242 243 244 245


/* The following don't have any apparent purpose, but are in the
 * code.  someday, will take them out altogether, but for now, 
 * document them here
 */
246 247 248 249 250 251 252 253
/* #define OMIT_PARTIAL_INDEX */
/* #define PERFECT_MMGR       */
/* #define PERFECT_MEM        */
/* #define NO_BUFFERISVALID   */
/* #define NO_SECURITY        */
/* #define TIOGA              */
/* #define OLD_REWRITE        */
/* #define NOTYET             */
254 255 256 257 258 259 260


/* Undocumented "features"? */
#define FASTBUILD /* access/nbtree/nbtsort.c */



261 262 263



264
#endif /* CONFIG_H */
265