aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-11-05 19:17:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-11-05 19:17:13 +0000
commit98e8b4805324d8ba0b196b8ffaafd5ddd3051ea1 (patch)
tree61d027f5621f3ff37a675fb2e9982e0d28a81242 /src/backend/parser
parent0ed3c7665e2fe46efd3eef936a1265be2ec6707f (diff)
downloadpostgresql-98e8b4805324d8ba0b196b8ffaafd5ddd3051ea1.tar.gz
postgresql-98e8b4805324d8ba0b196b8ffaafd5ddd3051ea1.zip
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/parser')
-rw-r--r--src/backend/parser/gram.y12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 5a12bf11891..12c1acac4d8 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -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;
}
;