]> granicus.if.org Git - postgresql/blob - src/backend/utils/init/globals.c
Remove tqual.h includes not needed.
[postgresql] / src / backend / utils / init / globals.c
1 /*-------------------------------------------------------------------------
2  *
3  * globals.c--
4  *        global variable declarations
5  *
6  * Copyright (c) 1994, Regents of the University of California
7  *
8  *
9  * IDENTIFICATION
10  *        $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.17 1997/11/24 05:09:13 momjian Exp $
11  *
12  * NOTES
13  *        Globals used all over the place should be declared here and not
14  *        in other modules.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #include <fcntl.h>
19 #include <stdio.h>
20 #include <string.h>
21 #include <sys/file.h>
22 #include <sys/types.h>
23 #include <math.h>
24 #include <unistd.h>
25
26 #include "postgres.h"
27 #include "miscadmin.h"                  /* where the declarations go */
28
29 #include <storage/backendid.h>
30 #include "access/heapam.h"
31 #include "storage/sinval.h"
32 #include "storage/sinvaladt.h"
33 #include "storage/lmgr.h"
34 #include "utils/elog.h"
35
36 #include "catalog/catname.h"
37
38 int                     Portfd = -1;
39 int                     Noversion = 0;
40 int                     Quiet = 1;
41
42 int                     MasterPid;
43 char       *DataDir;
44
45  /*
46   * The PGDATA directory user says to use, or defaults to via environment
47   * variable.  NULL if no option given and no environment variable set
48   */
49 Relation        reldesc;                        /* current relation descriptor */
50
51 char            OutputFileName[MAXPGPATH] = "";
52
53 BackendId       MyBackendId;
54 BackendTag      MyBackendTag;
55
56 char       *UserName = NULL;
57 char       *DatabaseName = NULL;
58 char       *DatabasePath = NULL;
59
60 bool            MyDatabaseIdIsInitialized = false;
61 Oid                     MyDatabaseId = InvalidOid;
62 bool            TransactionInitWasProcessed = false;
63
64 bool            IsUnderPostmaster = false;
65 bool            IsPostmaster = false;
66
67 short           DebugLvl = 0;
68
69 int                     DateStyle = USE_POSTGRES_DATES;
70 bool            EuroDates = false;
71 bool            HasCTZSet = false;
72 bool            CDayLight = false;
73 int                     CTimeZone = 0;
74 char            CTZName[MAXTZLEN + 1] = "";
75
76 char            DateFormat[20] = "%d-%m-%Y";            /* mjl: sizes! or better
77                                                                                                  * malloc? XXX */
78 char            FloatFormat[20] = "%f";
79
80 int                     fsyncOff = 0;
81 int                     SortMem = 512;
82
83 char       *IndexedCatalogNames[] = {
84         AttributeRelationName,
85         ProcedureRelationName,
86         TypeRelationName,
87         RelationRelationName,
88         0
89 };
90
91
92 /* ----------------
93  * we just do a linear search now so there's no requirement that the list
94  * be ordered.  The list is so small it shouldn't make much difference.
95  * make sure the list is null-terminated
96  *                              - jolly 8/19/95
97  *
98  * OLD COMMENT
99  *              WARNING  WARNING  WARNING  WARNING      WARNING  WARNING
100  *
101  *              keep SharedSystemRelationNames[] in SORTED order!  A binary search
102  *              is done on it in catalog.c!
103  *
104  *              XXX this is a serious hack which should be fixed -cim 1/26/90
105  * ----------------
106  */
107 char       *SharedSystemRelationNames[] = {
108         DatabaseRelationName,
109         GroupRelationName,
110         LogRelationName,
111         UserRelationName,
112         VariableRelationName,
113         0
114 };