1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

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.
This commit is contained in:
Tom Lane
2004-11-05 19:17:13 +00:00
parent 0ed3c7665e
commit 98e8b48053
37 changed files with 370 additions and 585 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/pg_namespace.c,v 1.10 2004/08/29 04:12:29 momjian Exp $
* $PostgreSQL: pgsql/src/backend/catalog/pg_namespace.c,v 1.11 2004/11/05 19:15:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,7 +27,7 @@
* ---------------
*/
Oid
NamespaceCreate(const char *nspName, int32 ownerSysId, Oid nspTablespace)
NamespaceCreate(const char *nspName, int32 ownerSysId)
{
Relation nspdesc;
HeapTuple tup;
@@ -59,7 +59,6 @@ NamespaceCreate(const char *nspName, int32 ownerSysId, Oid nspTablespace)
namestrcpy(&nname, nspName);
values[Anum_pg_namespace_nspname - 1] = NameGetDatum(&nname);
values[Anum_pg_namespace_nspowner - 1] = Int32GetDatum(ownerSysId);
values[Anum_pg_namespace_nsptablespace - 1] = Int32GetDatum(nspTablespace);
nulls[Anum_pg_namespace_nspacl - 1] = 'n';
nspdesc = heap_openr(NamespaceRelationName, RowExclusiveLock);