mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +03:00
Add add_missing_from GUC variable.
Nigel J. Andrews
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.81 2003/04/29 22:13:10 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.82 2003/06/11 22:13:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
/* GUC parameter */
|
||||
bool add_missing_from;
|
||||
|
||||
static Node *scanNameSpaceForRefname(ParseState *pstate, Node *nsnode,
|
||||
const char *refname);
|
||||
@@ -1861,7 +1863,14 @@ warnAutoRange(ParseState *pstate, RangeVar *relation)
|
||||
}
|
||||
}
|
||||
if (foundInFromCl)
|
||||
elog(NOTICE, "Adding missing FROM-clause entry%s for table \"%s\"",
|
||||
pstate->parentParseState != NULL ? " in subquery" : "",
|
||||
relation->relname);
|
||||
{
|
||||
if (add_missing_from)
|
||||
elog(NOTICE, "Adding missing FROM-clause entry%s for table \"%s\"",
|
||||
pstate->parentParseState != NULL ? " in subquery" : "",
|
||||
relation->relname);
|
||||
else
|
||||
elog(ERROR, "Missing FROM-clause entry%s for table \"%s\"",
|
||||
pstate->parentParseState != NULL ? " in subquery" : "",
|
||||
relation->relname);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.130 2003/06/11 18:49:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.131 2003/06/11 22:13:22 momjian Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "optimizer/paths.h"
|
||||
#include "optimizer/prep.h"
|
||||
#include "parser/parse_expr.h"
|
||||
#include "parser/parse_relation.h"
|
||||
#include "storage/fd.h"
|
||||
#include "storage/freespace.h"
|
||||
#include "storage/lock.h"
|
||||
@@ -550,10 +551,15 @@ static struct config_bool
|
||||
{"transaction_read_only", PGC_USERSET, GUC_NO_RESET_ALL}, &XactReadOnly,
|
||||
false, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"add_missing_from", PGC_USERSET}, &add_missing_from,
|
||||
true, NULL, NULL
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0}, NULL, false, NULL, NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -742,6 +748,7 @@ static struct config_int
|
||||
0, 0, INT_MAX / 1000, NULL, NULL
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0}, NULL, 0, 0, 0, NULL, NULL
|
||||
}
|
||||
@@ -784,6 +791,7 @@ static struct config_real
|
||||
0.5, 0.0, 1.0, assign_random_seed, show_random_seed
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0}, NULL, 0.0, 0.0, 0.0, NULL, NULL
|
||||
}
|
||||
@@ -946,6 +954,7 @@ static struct config_string
|
||||
XLOG_sync_method_default, assign_xlog_sync_method, NULL
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0}, NULL, NULL, NULL, NULL
|
||||
}
|
||||
|
||||
@@ -208,3 +208,4 @@
|
||||
#statement_timeout = 0 # 0 is disabled, in milliseconds
|
||||
#db_user_namespace = false
|
||||
#preload_libraries = ''
|
||||
#add_missing_from = true
|
||||
|
||||
Reference in New Issue
Block a user