1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

Tom Lane wrote:

> There's no longer a separate call to heap_storage_create in that routine
> --- the right place to make the test is now in the storage_create
> boolean parameter being passed to heap_create.  A simple change, but
> it passeth patch's understanding ...

Thanks.

Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out
that even after fixing the failed hunks, there was a new spot in
bufmgr.c which needed to be fixed (related to temp relations;
RelationUpdateNumberOfBlocks). But thankfully the regression test code
caught it :-)

Joe Conway
This commit is contained in:
Bruce Momjian
2002-08-15 16:36:08 +00:00
parent 38294db64b
commit b1a5f87209
27 changed files with 434 additions and 58 deletions

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.358 2002/08/10 19:01:53 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.359 2002/08/15 16:36:03 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -205,7 +205,7 @@ static void doNegateFloat(Value *v);
%type <list> stmtblock, stmtmulti,
OptTableElementList, TableElementList, OptInherit, definition,
opt_distinct, opt_definition, func_args,
opt_distinct, opt_definition, func_args, rowdefinition
func_args_list, func_as, createfunc_opt_list
oper_argtypes, RuleActionList, RuleActionMulti,
opt_column_list, columnList, opt_name_list,
@@ -2233,6 +2233,39 @@ DefineStmt:
n->definition = $4;
$$ = (Node *)n;
}
| CREATE TYPE_P any_name AS rowdefinition
{
CompositeTypeStmt *n = makeNode(CompositeTypeStmt);
RangeVar *r = makeNode(RangeVar);
switch (length($3))
{
case 1:
r->catalogname = NULL;
r->schemaname = NULL;
r->relname = strVal(lfirst($3));
break;
case 2:
r->catalogname = NULL;
r->schemaname = strVal(lfirst($3));
r->relname = strVal(lsecond($3));
break;
case 3:
r->catalogname = strVal(lfirst($3));
r->schemaname = strVal(lsecond($3));
r->relname = strVal(lfirst(lnext(lnext($3))));
break;
default:
elog(ERROR,
"Improper qualified name "
"(too many dotted names): %s",
NameListToString($3));
break;
}
n->typevar = r;
n->coldeflist = $5;
$$ = (Node *)n;
}
| CREATE CHARACTER SET opt_as any_name GET definition opt_collate
{
DefineStmt *n = makeNode(DefineStmt);
@@ -2243,6 +2276,9 @@ DefineStmt:
}
;
rowdefinition: '(' TableFuncElementList ')' { $$ = $2; }
;
definition: '(' def_list ')' { $$ = $2; }
;