Remove RELKIND_UNCATALOGED.

This may have been important at some point in the past, but it no
longer does anything useful.

Review by Tom Lane.
This commit is contained in:
Robert Haas 2012-06-14 09:47:30 -04:00
parent 7582e0be78
commit d2c86a1ccd
10 changed files with 9 additions and 19 deletions

View File

@ -217,7 +217,6 @@ pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
{
case RELKIND_RELATION:
case RELKIND_TOASTVALUE:
case RELKIND_UNCATALOGED:
case RELKIND_SEQUENCE:
return pgstat_heap(rel, fcinfo);
case RELKIND_INDEX:

View File

@ -790,7 +790,6 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc, Oid amoptions)
case RELKIND_RELATION:
case RELKIND_TOASTVALUE:
case RELKIND_VIEW:
case RELKIND_UNCATALOGED:
options = heap_reloptions(classForm->relkind, datum, false);
break;
case RELKIND_INDEX:

View File

@ -2968,10 +2968,6 @@ getRelationDescription(StringInfo buffer, Oid relid)
appendStringInfo(buffer, _("sequence %s"),
relname);
break;
case RELKIND_UNCATALOGED:
appendStringInfo(buffer, _("uncataloged table %s"),
relname);
break;
case RELKIND_TOASTVALUE:
appendStringInfo(buffer, _("toast table %s"),
relname);

View File

@ -327,7 +327,8 @@ heap_create(const char *relname,
reltablespace,
shared_relation,
mapped_relation,
relpersistence);
relpersistence,
relkind);
/*
* Have the storage manager create the relation's disk file, if needed.
@ -889,7 +890,6 @@ AddNewRelationTuple(Relation pg_class_desc,
new_rel_reltup->relowner = relowner;
new_rel_reltup->reltype = new_type_oid;
new_rel_reltup->reloftype = reloftype;
new_rel_reltup->relkind = relkind;
new_rel_desc->rd_att->tdtypeid = new_type_oid;

View File

@ -836,7 +836,6 @@ index_create(Relation heapRelation,
*/
indexRelation->rd_rel->relowner = heapRelation->rd_rel->relowner;
indexRelation->rd_rel->relam = accessMethodObjectId;
indexRelation->rd_rel->relkind = RELKIND_INDEX;
indexRelation->rd_rel->relhasoids = false;
/*

View File

@ -84,9 +84,7 @@ BootstrapToastTable(char *relName, Oid toastOid, Oid toastIndexOid)
rel = heap_openrv(makeRangeVar(NULL, relName, -1), AccessExclusiveLock);
/* Note: during bootstrap may see uncataloged relation */
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_UNCATALOGED)
if (rel->rd_rel->relkind != RELKIND_RELATION)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is not a table",

View File

@ -378,9 +378,7 @@ DefineIndex(RangeVar *heapRelation,
relationId = RelationGetRelid(rel);
namespaceId = RelationGetNamespace(rel);
/* Note: during bootstrap may see uncataloged relation */
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_UNCATALOGED)
if (rel->rd_rel->relkind != RELKIND_RELATION)
{
if (rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE)

View File

@ -2409,7 +2409,8 @@ RelationBuildLocalRelation(const char *relname,
Oid reltablespace,
bool shared_relation,
bool mapped_relation,
char relpersistence)
char relpersistence,
char relkind)
{
Relation rel;
MemoryContext oldcxt;
@ -2515,7 +2516,7 @@ RelationBuildLocalRelation(const char *relname,
namestrcpy(&rel->rd_rel->relname, relname);
rel->rd_rel->relnamespace = relnamespace;
rel->rd_rel->relkind = RELKIND_UNCATALOGED;
rel->rd_rel->relkind = relkind;
rel->rd_rel->relhasoids = rel->rd_att->tdhasoid;
rel->rd_rel->relnatts = natts;
rel->rd_rel->reltype = InvalidOid;

View File

@ -147,7 +147,6 @@ DESCR("");
#define RELKIND_VIEW 'v' /* view */
#define RELKIND_COMPOSITE_TYPE 'c' /* composite type */
#define RELKIND_FOREIGN_TABLE 'f' /* foreign table */
#define RELKIND_UNCATALOGED 'u' /* not yet cataloged */
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */

View File

@ -70,7 +70,8 @@ extern Relation RelationBuildLocalRelation(const char *relname,
Oid reltablespace,
bool shared_relation,
bool mapped_relation,
char relpersistence);
char relpersistence,
char relkind);
/*
* Routine to manage assignment of new relfilenode to a relation