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.22 1998/05/19 18:05:51 momjian Exp $
13 * Globals used all over the place should be declared here and not
16 *-------------------------------------------------------------------------
22 #include <sys/types.h>
27 #include "miscadmin.h" /* where the declarations go */
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 #include "libpq/pqcomm.h"
36 #include "catalog/catname.h"
38 ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
41 bool Noversion = false;
43 bool QueryCancel = false;
50 * The PGDATA directory user says to use, or defaults to via environment
51 * variable. NULL if no option given and no environment variable set
53 Relation reldesc; /* current relation descriptor */
55 char OutputFileName[MAXPGPATH] = "";
57 BackendId MyBackendId;
58 BackendTag MyBackendTag;
60 char *UserName = NULL;
61 char *DatabaseName = NULL;
62 char *DatabasePath = NULL;
64 bool MyDatabaseIdIsInitialized = false;
65 Oid MyDatabaseId = InvalidOid;
66 bool TransactionInitWasProcessed = false;
68 bool IsUnderPostmaster = false;
69 bool IsPostmaster = false;
73 int DateStyle = USE_POSTGRES_DATES;
74 bool EuroDates = false;
75 bool HasCTZSet = false;
76 bool CDayLight = false;
78 char CTZName[MAXTZLEN + 1] = "";
80 char DateFormat[20] = "%d-%m-%Y"; /* mjl: sizes! or better
82 char FloatFormat[20] = "%f";
87 char *IndexedCatalogNames[] = {
88 AttributeRelationName,
89 ProcedureRelationName,
97 * we just do a linear search now so there's no requirement that the list
98 * be ordered. The list is so small it shouldn't make much difference.
99 * make sure the list is null-terminated
103 * WARNING WARNING WARNING WARNING WARNING WARNING
105 * keep SharedSystemRelationNames[] in SORTED order! A binary search
106 * is done on it in catalog.c!
108 * XXX this is a serious hack which should be fixed -cim 1/26/90
111 char *SharedSystemRelationNames[] = {
112 DatabaseRelationName,
116 VariableRelationName,