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
920c5062
Commit
920c5062
authored
Sep 22, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetPGVariable() crashed on SET DateStyle TO DEFAULT and related cases.
parent
d3543706
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
src/backend/commands/variable.c
src/backend/commands/variable.c
+13
-8
No files found.
src/backend/commands/variable.c
View file @
920c5062
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.4
0 2000/08/01 18:29:29
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.4
1 2000/09/22 15:34:31
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -592,28 +592,33 @@ reset_random_seed(void)
...
@@ -592,28 +592,33 @@ reset_random_seed(void)
void
void
SetPGVariable
(
const
char
*
name
,
const
char
*
value
)
SetPGVariable
(
const
char
*
name
,
const
char
*
value
)
{
{
char
*
mvalue
=
value
?
pstrdup
(
value
)
:
((
char
*
)
NULL
);
/*
/*
* Special cases ought to be removed and handled separately
* Special cases ought to be removed and handled separately
* by TCOP
* by TCOP
*/
*/
if
(
strcasecmp
(
name
,
"datestyle"
)
==
0
)
if
(
strcasecmp
(
name
,
"datestyle"
)
==
0
)
parse_date
(
pstrdup
(
value
)
);
parse_date
(
mvalue
);
else
if
(
strcasecmp
(
name
,
"timezone"
)
==
0
)
else
if
(
strcasecmp
(
name
,
"timezone"
)
==
0
)
parse_timezone
(
pstrdup
(
value
)
);
parse_timezone
(
mvalue
);
else
if
(
strcasecmp
(
name
,
"DefaultXactIsoLevel"
)
==
0
)
else
if
(
strcasecmp
(
name
,
"DefaultXactIsoLevel"
)
==
0
)
parse_DefaultXactIsoLevel
(
pstrdup
(
value
)
);
parse_DefaultXactIsoLevel
(
mvalue
);
else
if
(
strcasecmp
(
name
,
"XactIsoLevel"
)
==
0
)
else
if
(
strcasecmp
(
name
,
"XactIsoLevel"
)
==
0
)
parse_XactIsoLevel
(
pstrdup
(
value
)
);
parse_XactIsoLevel
(
mvalue
);
#ifdef MULTIBYTE
#ifdef MULTIBYTE
else
if
(
strcasecmp
(
name
,
"client_encoding"
)
==
0
)
else
if
(
strcasecmp
(
name
,
"client_encoding"
)
==
0
)
parse_client_encoding
(
pstrdup
(
value
)
);
parse_client_encoding
(
mvalue
);
else
if
(
strcasecmp
(
name
,
"server_encoding"
)
==
0
)
else
if
(
strcasecmp
(
name
,
"server_encoding"
)
==
0
)
parse_server_encoding
(
pstrdup
(
value
)
);
parse_server_encoding
(
mvalue
);
#endif
#endif
else
if
(
strcasecmp
(
name
,
"random_seed"
)
==
0
)
else
if
(
strcasecmp
(
name
,
"random_seed"
)
==
0
)
parse_random_seed
(
pstrdup
(
value
)
);
parse_random_seed
(
mvalue
);
else
else
SetConfigOption
(
name
,
value
,
superuser
()
?
PGC_SUSET
:
PGC_USERSET
);
SetConfigOption
(
name
,
value
,
superuser
()
?
PGC_SUSET
:
PGC_USERSET
);
if
(
mvalue
)
pfree
(
mvalue
);
}
}
...
...
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