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

Commit79f6a94

Browse files
committed
Allow composite types in catalog bootstrap
When resolving types during catalog bootstrap, try to reload the pg_typecontents if a type is not found. That allows catalogs to containcomposite types, e.g. row types for other catalogs.Author: Justin PryzbyReviewed-by: Dean Rasheed, Tomas VondraDiscussion:https://postgr.es/m/ad7891d2-e90c-b446-9fe2-7419143847d7%40enterprisedb.com
1 parente1a5e65 commit79f6a94

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

‎src/backend/bootstrap/bootstrap.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,29 @@ gettype(char *type)
934934
returnapp->am_oid;
935935
}
936936
}
937+
938+
/*
939+
* The type wasn't known; reload the pg_type contents and check again
940+
* to handle composite types, added since last populating the list.
941+
*/
942+
943+
list_free_deep(Typ);
944+
Typ=NIL;
945+
populate_typ_list();
946+
947+
/*
948+
* Calling gettype would result in infinite recursion for types missing
949+
* in pg_type, so just repeat the lookup.
950+
*/
951+
foreach (lc,Typ)
952+
{
953+
structtypmap*app=lfirst(lc);
954+
if (strncmp(NameStr(app->am_typ.typname),type,NAMEDATALEN)==0)
955+
{
956+
Ap=app;
957+
returnapp->am_oid;
958+
}
959+
}
937960
}
938961
else
939962
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp