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.40 2000/01/26 05:57:26 momjian 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 "libpq/pqcomm.h"
29 #include "miscadmin.h"
30 #include "storage/backendid.h"
31 #include "storage/lmgr.h"
33 ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
35 bool Noversion = false;
37 bool QueryCancel = false;
40 struct Port *MyProcPort;
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
50 Relation reldesc; /* current relation descriptor */
52 char OutputFileName[MAXPGPATH] = "";
54 BackendId MyBackendId;
55 BackendTag MyBackendTag;
57 char *UserName = NULL;
58 char *DatabaseName = NULL;
59 char *DatabasePath = NULL;
61 bool MyDatabaseIdIsInitialized = false;
62 Oid MyDatabaseId = InvalidOid;
63 bool TransactionInitWasProcessed = false;
65 bool IsUnderPostmaster = false;
69 int DateStyle = USE_POSTGRES_DATES;
70 bool EuroDates = false;
71 bool HasCTZSet = false;
72 bool CDayLight = false;
74 char CTZName[MAXTZLEN + 1] = "";
76 char DateFormat[20] = "%d-%m-%Y"; /* mjl: sizes! or better
78 char FloatFormat[20] = "%f";
80 bool allowSystemTableMods = false;
83 char *IndexedCatalogNames[] = {
84 AttributeRelationName,
85 ProcedureRelationName,
96 char Ps_status_buffer[1024];
100 * we just do a linear search now so there's no requirement that the list
101 * be ordered. The list is so small it shouldn't make much difference.
102 * make sure the list is null-terminated
106 * WARNING WARNING WARNING WARNING WARNING WARNING
108 * keep SharedSystemRelationNames[] in SORTED order! A binary search
109 * is done on it in catalog.c!
111 * XXX this is a serious hack which should be fixed -cim 1/26/90
114 char *SharedSystemRelationNames[] = {
115 DatabaseRelationName,
119 VariableRelationName,