Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2c86a1

Browse files
committed
Remove RELKIND_UNCATALOGED.
This may have been important at some point in the past, but it nolonger does anything useful.Review by Tom Lane.
1 parent7582e0b commitd2c86a1

File tree

10 files changed

+9
-19
lines changed

10 files changed

+9
-19
lines changed

‎contrib/pgstattuple/pgstattuple.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
217217
{
218218
caseRELKIND_RELATION:
219219
caseRELKIND_TOASTVALUE:
220-
caseRELKIND_UNCATALOGED:
221220
caseRELKIND_SEQUENCE:
222221
returnpgstat_heap(rel,fcinfo);
223222
caseRELKIND_INDEX:

‎src/backend/access/common/reloptions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,6 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc, Oid amoptions)
790790
caseRELKIND_RELATION:
791791
caseRELKIND_TOASTVALUE:
792792
caseRELKIND_VIEW:
793-
caseRELKIND_UNCATALOGED:
794793
options=heap_reloptions(classForm->relkind,datum, false);
795794
break;
796795
caseRELKIND_INDEX:

‎src/backend/catalog/dependency.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,10 +2968,6 @@ getRelationDescription(StringInfo buffer, Oid relid)
29682968
appendStringInfo(buffer,_("sequence %s"),
29692969
relname);
29702970
break;
2971-
caseRELKIND_UNCATALOGED:
2972-
appendStringInfo(buffer,_("uncataloged table %s"),
2973-
relname);
2974-
break;
29752971
caseRELKIND_TOASTVALUE:
29762972
appendStringInfo(buffer,_("toast table %s"),
29772973
relname);

‎src/backend/catalog/heap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ heap_create(const char *relname,
327327
reltablespace,
328328
shared_relation,
329329
mapped_relation,
330-
relpersistence);
330+
relpersistence,
331+
relkind);
331332

332333
/*
333334
* Have the storage manager create the relation's disk file, if needed.
@@ -889,7 +890,6 @@ AddNewRelationTuple(Relation pg_class_desc,
889890
new_rel_reltup->relowner=relowner;
890891
new_rel_reltup->reltype=new_type_oid;
891892
new_rel_reltup->reloftype=reloftype;
892-
new_rel_reltup->relkind=relkind;
893893

894894
new_rel_desc->rd_att->tdtypeid=new_type_oid;
895895

‎src/backend/catalog/index.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,6 @@ index_create(Relation heapRelation,
836836
*/
837837
indexRelation->rd_rel->relowner=heapRelation->rd_rel->relowner;
838838
indexRelation->rd_rel->relam=accessMethodObjectId;
839-
indexRelation->rd_rel->relkind=RELKIND_INDEX;
840839
indexRelation->rd_rel->relhasoids= false;
841840

842841
/*

‎src/backend/catalog/toasting.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ BootstrapToastTable(char *relName, Oid toastOid, Oid toastIndexOid)
8484

8585
rel=heap_openrv(makeRangeVar(NULL,relName,-1),AccessExclusiveLock);
8686

87-
/* Note: during bootstrap may see uncataloged relation */
88-
if (rel->rd_rel->relkind!=RELKIND_RELATION&&
89-
rel->rd_rel->relkind!=RELKIND_UNCATALOGED)
87+
if (rel->rd_rel->relkind!=RELKIND_RELATION)
9088
ereport(ERROR,
9189
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
9290
errmsg("\"%s\" is not a table",

‎src/backend/commands/indexcmds.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,7 @@ DefineIndex(RangeVar *heapRelation,
378378
relationId=RelationGetRelid(rel);
379379
namespaceId=RelationGetNamespace(rel);
380380

381-
/* Note: during bootstrap may see uncataloged relation */
382-
if (rel->rd_rel->relkind!=RELKIND_RELATION&&
383-
rel->rd_rel->relkind!=RELKIND_UNCATALOGED)
381+
if (rel->rd_rel->relkind!=RELKIND_RELATION)
384382
{
385383
if (rel->rd_rel->relkind==RELKIND_FOREIGN_TABLE)
386384

‎src/backend/utils/cache/relcache.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,8 @@ RelationBuildLocalRelation(const char *relname,
24092409
Oidreltablespace,
24102410
boolshared_relation,
24112411
boolmapped_relation,
2412-
charrelpersistence)
2412+
charrelpersistence,
2413+
charrelkind)
24132414
{
24142415
Relationrel;
24152416
MemoryContextoldcxt;
@@ -2515,7 +2516,7 @@ RelationBuildLocalRelation(const char *relname,
25152516
namestrcpy(&rel->rd_rel->relname,relname);
25162517
rel->rd_rel->relnamespace=relnamespace;
25172518

2518-
rel->rd_rel->relkind=RELKIND_UNCATALOGED;
2519+
rel->rd_rel->relkind=relkind;
25192520
rel->rd_rel->relhasoids=rel->rd_att->tdhasoid;
25202521
rel->rd_rel->relnatts=natts;
25212522
rel->rd_rel->reltype=InvalidOid;

‎src/include/catalog/pg_class.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ DESCR("");
147147
#defineRELKIND_VIEW 'v'/* view */
148148
#defineRELKIND_COMPOSITE_TYPE 'c'/* composite type */
149149
#defineRELKIND_FOREIGN_TABLE 'f'/* foreign table */
150-
#defineRELKIND_UNCATALOGED 'u'/* not yet cataloged */
151150

152151
#defineRELPERSISTENCE_PERMANENT'p'/* regular table */
153152
#defineRELPERSISTENCE_UNLOGGED'u'/* unlogged permanent table */

‎src/include/utils/relcache.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ extern Relation RelationBuildLocalRelation(const char *relname,
7070
Oidreltablespace,
7171
boolshared_relation,
7272
boolmapped_relation,
73-
charrelpersistence);
73+
charrelpersistence,
74+
charrelkind);
7475

7576
/*
7677
* Routine to manage assignment of new relfilenode to a relation

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp