diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-11-05 19:17:13 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-11-05 19:17:13 +0000 |
commit | 98e8b4805324d8ba0b196b8ffaafd5ddd3051ea1 (patch) | |
tree | 61d027f5621f3ff37a675fb2e9982e0d28a81242 /src/backend/utils/misc/guc.c | |
parent | 0ed3c7665e2fe46efd3eef936a1265be2ec6707f (diff) |
Create 'default_tablespace' GUC variable that supplies a TABLESPACE
clause implicitly whenever one is not given explicitly. Remove concept
of a schema having an associated tablespace, and simplify the rules for
selecting a default tablespace for a table or index. It's now just
(a) explicit TABLESPACE clause; (b) default_tablespace if that's not an
empty string; (c) database's default. This will allow pg_dump to use
SET commands instead of tablespace clauses to determine object locations
(but I didn't actually make it do so). All per recent discussions.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index c742ace1b5c..b59644397cf 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.247 2004/11/04 19:08:42 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.248 2004/11/05 19:16:16 tgl Exp $ * *-------------------------------------------------------------------- */ @@ -78,6 +78,7 @@ extern DLLIMPORT bool check_function_bodies; extern int CommitDelay; extern int CommitSiblings; extern int DebugSharedBuffers; +extern char *default_tablespace; static const char *assign_log_destination(const char *value, bool doit, GucSource source); @@ -1507,6 +1508,15 @@ static struct config_string ConfigureNamesString[] = }, { + {"default_tablespace", PGC_USERSET, CLIENT_CONN_STATEMENT, + gettext_noop("Sets the default tablespace to create tables and indexes in."), + gettext_noop("An empty string selects the database's default tablespace.") + }, + &default_tablespace, + "", assign_default_tablespace, NULL + }, + + { {"default_transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT, gettext_noop("Sets the transaction isolation level of each new transaction."), gettext_noop("Each SQL transaction has an isolation level, which " |