diff options
| author | Tom Lane | 2013-09-03 22:56:22 +0000 |
|---|---|---|
| committer | Tom Lane | 2013-09-03 22:56:22 +0000 |
| commit | 0c66a223774dec62edb5281a47e72fe480a8f7aa (patch) | |
| tree | e9d47e72e97785811366f74a6ddc3e6895ab1be9 /src/backend | |
| parent | 546f7c2e38531469eb3cff62256fde8606330c67 (diff) | |
Update comments concerning PGC_S_TEST.
This GUC context value was once only used by ALTER DATABASE SET and
ALTER USER SET. That's not true anymore, though, so rewrite the
comments to be a bit more general.
Patch in HEAD only, since this is just an internal documentation issue.
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/commands/tablespace.c | 19 | ||||
| -rw-r--r-- | src/backend/utils/cache/ts_cache.c | 7 |
2 files changed, 7 insertions, 19 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index ba9cb1f8f10..155eb7c2481 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -977,12 +977,8 @@ check_default_tablespace(char **newval, void **extra, GucSource source) !OidIsValid(get_tablespace_oid(*newval, true))) { /* - * When source == PGC_S_TEST, we are checking the argument of an - * ALTER DATABASE SET or ALTER USER SET command. pg_dumpall dumps - * all roles before tablespaces, so if we're restoring a - * pg_dumpall script the tablespace might not yet exist, but will - * be created later. Because of that, issue a NOTICE if source == - * PGC_S_TEST, but accept the value anyway. + * When source == PGC_S_TEST, don't throw a hard error for a + * nonexistent tablespace, only a NOTICE. See comments in guc.h. */ if (source == PGC_S_TEST) { @@ -1111,14 +1107,9 @@ check_temp_tablespaces(char **newval, void **extra, GucSource source) } /* - * In an interactive SET command, we ereport for bad info. When - * source == PGC_S_TEST, we are checking the argument of an ALTER - * DATABASE SET or ALTER USER SET command. pg_dumpall dumps all - * roles before tablespaces, so if we're restoring a pg_dumpall - * script the tablespace might not yet exist, but will be created - * later. Because of that, issue a NOTICE if source == - * PGC_S_TEST, but accept the value anyway. Otherwise, silently - * ignore any bad list elements. + * In an interactive SET command, we ereport for bad info. When + * source == PGC_S_TEST, don't throw a hard error for a + * nonexistent tablespace, only a NOTICE. See comments in guc.h. */ curoid = get_tablespace_oid(curname, source <= PGC_S_TEST); if (curoid == InvalidOid) diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c index 4e79247218c..e61b3291301 100644 --- a/src/backend/utils/cache/ts_cache.c +++ b/src/backend/utils/cache/ts_cache.c @@ -604,11 +604,8 @@ check_TSCurrentConfig(char **newval, void **extra, GucSource source) cfgId = get_ts_config_oid(stringToQualifiedNameList(*newval), true); /* - * When source == PGC_S_TEST, we are checking the argument of an ALTER - * DATABASE SET or ALTER USER SET command. It could be that the - * intended use of the setting is for some other database, so we - * should not error out if the text search configuration is not - * present in the current database. We issue a NOTICE instead. + * When source == PGC_S_TEST, don't throw a hard error for a + * nonexistent configuration, only a NOTICE. See comments in guc.h. */ if (!OidIsValid(cfgId)) { |
