1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +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

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.478 2004/10/01 16:39:59 tgl Exp $
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.479 2004/11/05 19:16:02 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -780,7 +780,7 @@ DropGroupStmt:
*****************************************************************************/
CreateSchemaStmt:
CREATE SCHEMA OptSchemaName AUTHORIZATION UserId OptTableSpace OptSchemaEltList
CREATE SCHEMA OptSchemaName AUTHORIZATION UserId OptSchemaEltList
{
CreateSchemaStmt *n = makeNode(CreateSchemaStmt);
/* One can omit the schema name or the authorization id. */
@@ -789,18 +789,16 @@ CreateSchemaStmt:
else
n->schemaname = $5;
n->authid = $5;
n->tablespacename = $6;
n->schemaElts = $7;
n->schemaElts = $6;
$$ = (Node *)n;
}
| CREATE SCHEMA ColId OptTableSpace OptSchemaEltList
| CREATE SCHEMA ColId OptSchemaEltList
{
CreateSchemaStmt *n = makeNode(CreateSchemaStmt);
/* ...but not both */
n->schemaname = $3;
n->authid = NULL;
n->tablespacename = $4;
n->schemaElts = $5;
n->schemaElts = $4;
$$ = (Node *)n;
}
;