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

Commitf4329fd

Browse files
Amit Kapilapull[bot]
Amit Kapila
authored andcommitted
Move related functions next to each other in pg_publication.c.
This also improves comments atop is_publishable_class().Author: Peter SmithReviewed-by: Amit Kapila, Hou ZhijieDiscussion:https://postgr.es/m/CAHut+PupQ5UW9A9ut0Yjt21J9tHhx958z5L0k8-9hTYf_NYqxA@mail.gmail.com
1 parent1a2b024 commitf4329fd

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎src/backend/catalog/pg_publication.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ check_publication_add_schema(Oid schemaid)
115115
* Returns if relation represented by oid and Form_pg_class entry
116116
* is publishable.
117117
*
118-
* Does same checks asthe above, but does not need relation to be opened
119-
* and also does not throw errors.
118+
* Does same checks ascheck_publication_add_relation() above, but does not
119+
*need relation to be openedand also does not throw errors.
120120
*
121121
* XXX This also excludes all tables with relid < FirstNormalObjectId,
122122
* ie all tables created during initdb. This mainly affects the preinstalled
@@ -140,6 +140,15 @@ is_publishable_class(Oid relid, Form_pg_class reltuple)
140140
relid >=FirstNormalObjectId;
141141
}
142142

143+
/*
144+
* Another variant of is_publishable_class(), taking a Relation.
145+
*/
146+
bool
147+
is_publishable_relation(Relationrel)
148+
{
149+
returnis_publishable_class(RelationGetRelid(rel),rel->rd_rel);
150+
}
151+
143152
/*
144153
* Filter out the partitions whose parent tables were also specified in
145154
* the publication.
@@ -179,15 +188,6 @@ filter_partitions(List *relids)
179188
returnresult;
180189
}
181190

182-
/*
183-
* Another variant of this, taking a Relation.
184-
*/
185-
bool
186-
is_publishable_relation(Relationrel)
187-
{
188-
returnis_publishable_class(RelationGetRelid(rel),rel->rd_rel);
189-
}
190-
191191
/*
192192
* Returns true if any schema is associated with the publication, false if no
193193
* schema is associated with the publication.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp