Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8de20a3a
Commit
8de20a3a
authored
Dec 16, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use environment variable PGDATESTYLE on backend startup to initialize
date/time formats and conventions.
parent
a58825a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+33
-4
No files found.
src/backend/tcop/postgres.c
View file @
8de20a3a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.5
6 1997/12/11 17:36:42 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.5
7 1997/12/16 15:57:00 thomas
Exp $
*
*
* NOTES
* NOTES
* this is the "main" module of the postgres backend and
* this is the "main" module of the postgres backend and
...
@@ -854,6 +854,7 @@ PostgresMain(int argc, char *argv[])
...
@@ -854,6 +854,7 @@ PostgresMain(int argc, char *argv[])
Dlelem
*
curr
;
Dlelem
*
curr
;
int
status
;
int
status
;
char
*
DBDate
=
NULL
;
extern
int
optind
;
extern
int
optind
;
extern
char
*
optarg
;
extern
char
*
optarg
;
extern
short
DebugLvl
;
extern
short
DebugLvl
;
...
@@ -882,6 +883,10 @@ PostgresMain(int argc, char *argv[])
...
@@ -882,6 +883,10 @@ PostgresMain(int argc, char *argv[])
* parse command line arguments
* parse command line arguments
* ----------------
* ----------------
*/
*/
/*
* Set default values.
*/
flagC
=
flagQ
=
flagE
=
flagEu
=
ShowStats
=
0
;
flagC
=
flagQ
=
flagE
=
flagEu
=
ShowStats
=
0
;
ShowParserStats
=
ShowPlannerStats
=
ShowExecutorStats
=
0
;
ShowParserStats
=
ShowPlannerStats
=
ShowExecutorStats
=
0
;
#ifdef LOCK_MGR_DEBUG
#ifdef LOCK_MGR_DEBUG
...
@@ -893,9 +898,33 @@ PostgresMain(int argc, char *argv[])
...
@@ -893,9 +898,33 @@ PostgresMain(int argc, char *argv[])
* NULL means Unix-socket only
* NULL means Unix-socket only
*/
*/
hostName
=
getenv
(
"PGHOST"
);
hostName
=
getenv
(
"PGHOST"
);
DataDir
=
getenv
(
"PGDATA"
);
/*
* Try to get initial values for date styles and formats.
* Does not do a complete job, but should be good enough for backend.
* Cannot call parse_date() since palloc/pfree memory is not set up yet.
*/
DBDate
=
getenv
(
"PGDATESTYLE"
);
if
(
DBDate
!=
NULL
)
{
if
(
strcasecmp
(
DBDate
,
"ISO"
)
==
0
)
DateStyle
=
USE_ISO_DATES
;
else
if
(
strcasecmp
(
DBDate
,
"SQL"
)
==
0
)
DateStyle
=
USE_SQL_DATES
;
else
if
(
strcasecmp
(
DBDate
,
"POSTGRES"
)
==
0
)
DateStyle
=
USE_POSTGRES_DATES
;
else
if
(
strcasecmp
(
DBDate
,
"GERMAN"
)
==
0
)
{
DateStyle
=
USE_GERMAN_DATES
;
EuroDates
=
TRUE
;
}
DataDir
=
getenv
(
"PGDATA"
);
/* default */
if
(
strcasecmp
(
DBDate
,
"NONEURO"
)
==
0
)
multiplexedBackend
=
false
;
/* default */
EuroDates
=
FALSE
;
else
if
(
strcasecmp
(
DBDate
,
"EURO"
)
==
0
)
EuroDates
=
TRUE
;
}
multiplexedBackend
=
false
;
while
((
flag
=
getopt
(
argc
,
argv
,
"B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:x:F"
))
while
((
flag
=
getopt
(
argc
,
argv
,
"B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:x:F"
))
!=
EOF
)
!=
EOF
)
...
@@ -1343,7 +1372,7 @@ PostgresMain(int argc, char *argv[])
...
@@ -1343,7 +1372,7 @@ PostgresMain(int argc, char *argv[])
if
(
IsUnderPostmaster
==
false
)
if
(
IsUnderPostmaster
==
false
)
{
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.5
6 $ $Date: 1997/12/11 17:36:42
$"
);
puts
(
"$Revision: 1.5
7 $ $Date: 1997/12/16 15:57:00
$"
);
}
}
/* ----------------
/* ----------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment