mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Make large objects their own relkind type. Fix dups in pg_class_mb
files. Fix sequence creation hack for relkind type.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.26 1998/07/27 19:37:50 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.27 1998/08/06 05:12:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -218,7 +218,7 @@ copy_heap(Oid OIDOldHeap)
|
||||
|
||||
tupdesc = CreateTupleDescCopy(OldHeapDesc);
|
||||
|
||||
OIDNewHeap = heap_create_with_catalog(NewName, tupdesc);
|
||||
OIDNewHeap = heap_create_with_catalog(NewName, tupdesc, RELKIND_RELATION);
|
||||
|
||||
if (!OidIsValid(OIDNewHeap))
|
||||
elog(ERROR, "clusterheap: cannot create temporary heap relation\n");
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.30 1998/06/15 19:28:14 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.31 1998/08/06 05:12:24 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ static void StoreCatalogInheritance(Oid relationId, List *supers);
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
DefineRelation(CreateStmt *stmt)
|
||||
DefineRelation(CreateStmt *stmt, char relkind)
|
||||
{
|
||||
char *relname = palloc(NAMEDATALEN);
|
||||
List *schema = stmt->tableElts;
|
||||
@@ -137,7 +137,8 @@ DefineRelation(CreateStmt *stmt)
|
||||
}
|
||||
}
|
||||
|
||||
relationId = heap_create_with_catalog(relname, descriptor);
|
||||
relationId = heap_create_with_catalog(relname,
|
||||
descriptor, relkind);
|
||||
|
||||
StoreCatalogInheritance(relationId, inheritList);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.21 1998/06/15 19:28:15 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.22 1998/08/06 05:12:26 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1032,7 +1032,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
|
||||
tupdesc = rel->rd_att;
|
||||
|
||||
relid = heap_create_with_catalog(
|
||||
child->nodeElem->outTypes->val[0], tupdesc);
|
||||
child->nodeElem->outTypes->val[0],
|
||||
tupdesc, RELKIND_RELATION);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1055,7 +1056,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
|
||||
else
|
||||
{
|
||||
relid = heap_create_with_catalog(
|
||||
child->nodeElem->outTypes->val[0], tupdesc);
|
||||
child->nodeElem->outTypes->val[0],
|
||||
tupdesc, RELKIND_RELATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#define SEQ_MAXVALUE ((int4)0x7FFFFFFF)
|
||||
#define SEQ_MINVALUE -(SEQ_MAXVALUE)
|
||||
|
||||
bool ItsSequenceCreation = false;
|
||||
|
||||
typedef struct FormData_pg_sequence
|
||||
{
|
||||
NameData sequence_name;
|
||||
@@ -157,15 +155,7 @@ DefineSequence(CreateSeqStmt *seq)
|
||||
stmt->inhRelnames = NIL;
|
||||
stmt->constraints = NIL;
|
||||
|
||||
ItsSequenceCreation = true; /* hack */
|
||||
|
||||
DefineRelation(stmt);
|
||||
|
||||
/*
|
||||
* Xact abort calls CloseSequences, which turns ItsSequenceCreation
|
||||
* off
|
||||
*/
|
||||
ItsSequenceCreation = false;/* hack */
|
||||
DefineRelation(stmt, RELKIND_SEQUENCE);
|
||||
|
||||
rel = heap_openr(seq->seqname);
|
||||
Assert(RelationIsValid(rel));
|
||||
@@ -438,8 +428,6 @@ CloseSequences(void)
|
||||
SeqTable elm;
|
||||
Relation rel;
|
||||
|
||||
ItsSequenceCreation = false;
|
||||
|
||||
for (elm = seqtab; elm != (SeqTable) NULL;)
|
||||
{
|
||||
if (elm->rel != (Relation) NULL) /* opened in current xact */
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.23 1998/07/19 05:49:12 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.24 1998/08/06 05:12:30 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ DefineVirtualRelation(char *relname, List *tlist)
|
||||
/*
|
||||
* finally create the relation...
|
||||
*/
|
||||
DefineRelation(&createStmt);
|
||||
DefineRelation(&createStmt, RELKIND_RELATION);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user