1 /*-------------------------------------------------------------------------
4 * global variable declarations
6 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
7 * Portions Copyright (c) 1994, Regents of the University of California
11 * $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.43 2000/05/05 03:09:43 tgl Exp $
14 * Globals used all over the place should be declared here and not
17 *-------------------------------------------------------------------------
21 #include <sys/types.h>
27 #include "catalog/catname.h"
28 #include "catalog/indexing.h"
29 #include "libpq/pqcomm.h"
30 #include "miscadmin.h"
31 #include "storage/backendid.h"
32 #include "storage/lmgr.h"
34 ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
36 bool Noversion = false;
38 bool QueryCancel = false;
41 struct Port *MyProcPort;
47 * The PGDATA directory user says to use, or defaults to via environment
48 * variable. NULL if no option given and no environment variable set
51 Relation reldesc; /* current relation descriptor */
53 char OutputFileName[MAXPGPATH] = "";
55 BackendId MyBackendId;
56 BackendTag MyBackendTag;
58 char *UserName = NULL;
59 char *DatabaseName = NULL;
60 char *DatabasePath = NULL;
62 bool MyDatabaseIdIsInitialized = false;
63 Oid MyDatabaseId = InvalidOid;
64 bool TransactionInitWasProcessed = false;
66 bool IsUnderPostmaster = false;
70 int DateStyle = USE_ISO_DATES;
71 bool EuroDates = false;
72 bool HasCTZSet = false;
73 bool CDayLight = false;
75 char CTZName[MAXTZLEN + 1] = "";
77 char DateFormat[20] = "%d-%m-%Y"; /* mjl: sizes! or better
79 char FloatFormat[20] = "%f";
81 bool allowSystemTableMods = false;
84 char *IndexedCatalogNames[] = {
85 AttributeRelationName,
86 ProcedureRelationName,
97 char Ps_status_buffer[1024];
102 * we just do a linear search now so there's no requirement that the list
103 * be ordered. The list is so small it shouldn't make much difference.
104 * make sure the list is null-terminated
108 * WARNING WARNING WARNING WARNING WARNING WARNING
110 * keep SharedSystemRelationNames[] in SORTED order! A binary search
111 * is done on it in catalog.c!
113 * XXX this is a serious hack which should be fixed -cim 1/26/90
116 char *SharedSystemRelationNames[] = {
117 DatabaseRelationName,
123 VariableRelationName,