config.h.in 8.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


/* the purpose of this file is to reduce the use of #ifdef's through
 * the code base by those porting the software, and to facilitate the
 * eventual use of autoconf to build the server 
 */

#ifndef CONFIG_H
#define CONFIG_H

#define BLCKSZ	8192

/* 
 * The following is set using configure.  
 */

17 18 19
/* Set to 1 if you have <endian.h> */
#undef HAVE_ENDIAN_H

20 21 22
/* Set to 1 if you have <crypt.h> */
#undef HAVE_CRYPT_H

23 24 25
/* Set to 1 if you have <termios.h> */
#undef HAVE_TERMIOS_H

M
Marc G. Fournier 已提交
26 27 28
/* Set to 1 if you have <float.h> */
#undef HAVE_FLOAT_H

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
/* Set to 1 if you have <limits.h> */
#undef HAVE_LIMITS_H

/* Set to 1 if  you have <values.h> */
#undef HAVE_VALUES_H

/* Set to 1 if  you have <sys/select.h> */
#undef HAVE_SYS_SELECT_H

/* Set to 1 if you have <readline.h> */
#undef HAVE_READLINE_H

/* Set to 1 if you have <history.h> */
#undef HAVE_HISTORY

44 45 46
/* Set to 1 if you have <dld.h> */
#undef HAVE_DLD_H

47 48 49 50 51 52 53 54 55 56 57 58
/* Set to 1 if you have isinf() */
#undef HAVE_ISINF

/* Set to 1 if you have tzset() */
#undef HAVE_TZSET

/* Set to 1 if you have int timezone */
#undef HAVE_INT_TIMEZONE

/* Set to 1 if you have cbrt() */
#undef HAVE_CBRT

59
/* Set to 1 if you have inet_aton() */
60 61
#undef HAVE_INET_ATON

62 63 64
/* Set to 1 if you have strerror() */
#undef HAVE_STRERROR

65 66 67 68 69 70 71 72 73 74 75 76
/* Set to 1 if you have rint() */
#undef HAVE_RINT 

/* Set to 1 if you have memmove() */
#undef HAVE_MEMMOVE

/* Set to 1 if you have sigsetjmp() */
#undef HAVE_SIGSETJMP

/* Set to 1 if you have kill() */
#undef HAVE_KILL

77 78 79
/* Set to 1 if you have vfork() */
#undef HAVE_VFORK

80 81 82 83 84 85
/* Set to 1 if you have sysconf() */
#undef HAVE_SYSCONF

/* Set to 1 if you have getrusage() */
#undef HAVE_GETRUSAGE

86 87 88 89 90 91 92 93 94
/* Set to 1 if you have waitpid() */
#undef HAVE_WAITPID

/* Set to 1 if you have setsid() */
#undef HAVE_SETSID

/* Set to 1 if you have sigprocmask() */
#undef HAVE_SIGPROCMASK

95 96 97
/* Set to 1 if you have strdup() */
#undef HAVE_STRDUP

98 99 100 101 102 103
/* Set to 1 if you have libreadline.a */
#undef HAVE_LIBREADLINE

/* Set to 1 if you have libhistory.a */
#undef HAVE_LIBHISTORY

104 105 106
/* Set to 1 if you have union semun */
#undef HAVE_UNION_SEMUN

107 108 109
/* Set to 1 if you want to USE_LOCALE */
#undef USE_LOCALE

110 111 112 113
/*
 * Code below this point should not require changes
 */

114
#include "os.h"
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273

/* This patch changes the behavior of aclcheck for groups. Currently an user
 * can access a table only if he has the required permission for ALL the groups
 * defined for that table. With my patch he can access a table if he has the
 * permission for ONE of the groups, which seems to me a more useful thing.
 * 
 * Used in: src/backend/tcop/aclchk.c
 * Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
 */
#define	ACLGROUP_PATCH


/*
 * 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.
 */ 

#ifndef       SIGNAL_ARGS
#  define SIGNAL_ARGS int postgres_signal_arg
#endif

/* 
 * DEF_PGPORT is the TCP port number on which the Postmaster listens by
 * default.  This can be overriden by command options, environment variables,
 * and the postconfig hook.
 */ 

#define DEF_PGPORT "5432"

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

/*
 * 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.
 */

/*  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
   code seems broken without it, Bruce Momjian */
/* #define LOARRAY */

/* 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

/*
 * This flag enables the use of idexes in plans generated for function
 * executions which normally are always executed with sequential scans.
 */
#define INDEXSCAN_PATCH 

/* #define DATEDEBUG */

/*
 * Define this if you want to use date constants with a short year
 * like '01/05/96'.
 */
/* #define USE_SHORT_YEAR */

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

/*
 * 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.
 */
#define FUNC_UTIL_PATCH

/*
 * Define this if you want to retrieve arrays attributes as Tcl lists instead
 * of postgres C-like arrays, for example {{"a1" "a2"} {"b1" "b2"}} instead 
 * of {{"a1","a2"},{"b1","b2"}}.
 */
#define TCL_ARRAYS

/*
 * The comparison routines for text and char data type give incorrect results
 * if the input data contains characters greater than 127.  As these routines
 * perform the comparison using signed char variables all character codes
 * greater than 127 are interpreted as less than 0.  These codes are used to
 * encode the iso8859 char sets.  Define this flag to correct the problem.
 */
#define UNSIGNED_CHAR_TEXT

/*
 * The following flag allows limiting the number of rows returned by a query.
 * You will need the loadable module utils.c to use this feature.
 */
#define QUERY_LIMIT

/*
 * The following flag allows copying tables from files with number of columns
 * different than the number of attributes setting missing attributes to NULL
 * and ignoring extra columns.  This also avoids the shift of the attributes
 * of the rest of the file if one line has a wrong column count.
 */
#define COPY_PATCH

/*
 * User locks are handled totally on the application side as long term
 * cooperative locks which extend beyond the normal transaction boundaries.
 * Their purpose is to indicate to an application that someone is `working'
 * on an item.  Define this flag to enable user locks.  You will need the
 * loadable module user-locks.c to use this feature.
 */
#define USER_LOCKS

/* Debug #defines */
/* #define IPORTAL_DEBUG  */
/* #define HEAPDEBUGALL  */
/* #define ISTRATDEBUG  */
/* #define FASTBUILD_DEBUG */
#define RTDEBUG 
#define GISTDEBUG 
/* #define PURGEDEBUG */
/* #define DEBUG_RECIPE */
/* #define ASYNC_DEBUG */
/* #define COPY_DEBUG */
/* #define VACUUM_DEBUG */
/* #define NBTINSERT_PATCH_DEBUG */


/* 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
 */
/* #define OMIT_PARTIAL_INDEX */
/* #define NO_BUFFERISVALID   */
/* #define NO_SECURITY        */
/* #define TIOGA              */
/* #define OLD_REWRITE        */
/* #define NOTYET             */

M
Marc G. Fournier 已提交
274 275 276 277 278 279 280 281
/* Genetic Query Optimization (GEQO):
 * 
 * The GEQO module in PostgreSQL is intended for the solution of the
 * query optimization problem by means of a Genetic Algorithm (GA).
 * It allows the handling of large JOIN queries through non-exhaustive
 * search.
 * For further information see README.GEQO <utesch@aut.tu-freiberg.de>.
 */
M
Marc G. Fournier 已提交
282
#define GEQO /* backend/optimizer/path/allpaths.c */
M
Marc G. Fournier 已提交
283

284 285 286 287 288
/*
 * Define this if you want psql to _always_ ask for a username and a password
 * for password authentication.
 */
/* #define PSQL_ALWAYS_GET_PASSWORDS */
289 290 291 292 293

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

#endif /* CONFIG_H */