Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit35c129c

Browse files
committed
Fix define_custom_variable to preserve any sourcefile/sourceline information
present in the placeholder. Noted while testing pg_stat_statements.
1 parentc63b9b1 commit35c129c

File tree

1 file changed

+12
-4
lines changed
  • src/backend/utils/misc

1 file changed

+12
-4
lines changed

‎src/backend/utils/misc/guc.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.488 2009/01/03 20:03:08 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.489 2009/01/05 13:23:33 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -5747,9 +5747,17 @@ define_custom_variable(struct config_generic * variable)
57475747
value=*pHolder->variable;
57485748

57495749
if (value)
5750-
set_config_option(name,value,
5751-
phcontext,pHolder->gen.source,
5752-
GUC_ACTION_SET, true);
5750+
{
5751+
if (set_config_option(name,value,
5752+
phcontext,pHolder->gen.source,
5753+
GUC_ACTION_SET, true))
5754+
{
5755+
/* Also copy over any saved source-location information */
5756+
if (pHolder->gen.sourcefile)
5757+
set_config_sourcefile(name,pHolder->gen.sourcefile,
5758+
pHolder->gen.sourceline);
5759+
}
5760+
}
57535761

57545762
/*
57555763
* Free up as much as we conveniently can of the placeholder structure

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp