1 /*-------------------------------------------------------------------------
4 * global variable declarations
6 * Copyright (c) 1994, Regents of the University of California
10 * $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.37 1999/09/27 20:27:09 momjian Exp $
13 * Globals used all over the place should be declared here and not
16 *-------------------------------------------------------------------------
20 #include <sys/types.h>
26 #include "catalog/catname.h"
27 #include "libpq/pqcomm.h"
28 #include "miscadmin.h"
29 #include "storage/backendid.h"
30 #include "storage/lmgr.h"
32 ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
34 bool Noversion = false;
36 bool QueryCancel = false;
39 struct Port *MyProcPort;
45 * The PGDATA directory user says to use, or defaults to via environment
46 * variable. NULL if no option given and no environment variable set
49 Relation reldesc; /* current relation descriptor */
51 char OutputFileName[MAXPGPATH] = "";
53 BackendId MyBackendId;
54 BackendTag MyBackendTag;
56 char *UserName = NULL;
57 char *DatabaseName = NULL;
58 char *DatabasePath = NULL;
60 bool MyDatabaseIdIsInitialized = false;
61 Oid MyDatabaseId = InvalidOid;
62 bool TransactionInitWasProcessed = false;
64 bool IsUnderPostmaster = false;
68 int DateStyle = USE_POSTGRES_DATES;
69 bool EuroDates = false;
70 bool HasCTZSet = false;
71 bool CDayLight = false;
73 char CTZName[MAXTZLEN + 1] = "";
75 char DateFormat[20] = "%d-%m-%Y"; /* mjl: sizes! or better
77 char FloatFormat[20] = "%f";
79 bool allowSystemTableMods = false;
82 char *IndexedCatalogNames[] = {
83 AttributeRelationName,
84 ProcedureRelationName,
92 * we just do a linear search now so there's no requirement that the list
93 * be ordered. The list is so small it shouldn't make much difference.
94 * make sure the list is null-terminated
98 * WARNING WARNING WARNING WARNING WARNING WARNING
100 * keep SharedSystemRelationNames[] in SORTED order! A binary search
101 * is done on it in catalog.c!
103 * XXX this is a serious hack which should be fixed -cim 1/26/90
106 char *SharedSystemRelationNames[] = {
107 DatabaseRelationName,
111 VariableRelationName,