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

Commitb59d2fe

Browse files
committed
Add pg_opfamily_is_visible.
We already have similar functions for many other object types, includingoperator classes, so it seems like we should have this one, too.Extracted from a larger patch by Josh Kupershmidt
1 parent9473bb9 commitb59d2fe

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13109,6 +13109,12 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid);
1310913109
<entry><type>boolean</type></entry>
1311013110
<entry>is operator visible in search path</entry>
1311113111
</row>
13112+
<row>
13113+
<entry><literal><function>pg_opfamily_is_visible(<parameter>opclass_oid</parameter>)</function></literal>
13114+
</entry>
13115+
<entry><type>boolean</type></entry>
13116+
<entry>is operator family visible in search path</entry>
13117+
</row>
1311213118
<row>
1311313119
<entry><literal><function>pg_table_is_visible(<parameter>table_oid</parameter>)</function></literal>
1311413120
</entry>
@@ -13164,6 +13170,9 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid);
1316413170
<indexterm>
1316513171
<primary>pg_operator_is_visible</primary>
1316613172
</indexterm>
13173+
<indexterm>
13174+
<primary>pg_opfamily_is_visible</primary>
13175+
</indexterm>
1316713176
<indexterm>
1316813177
<primary>pg_table_is_visible</primary>
1316913178
</indexterm>

‎src/backend/catalog/namespace.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Datumpg_type_is_visible(PG_FUNCTION_ARGS);
202202
Datumpg_function_is_visible(PG_FUNCTION_ARGS);
203203
Datumpg_operator_is_visible(PG_FUNCTION_ARGS);
204204
Datumpg_opclass_is_visible(PG_FUNCTION_ARGS);
205+
Datumpg_opfamily_is_visible(PG_FUNCTION_ARGS);
205206
Datumpg_collation_is_visible(PG_FUNCTION_ARGS);
206207
Datumpg_conversion_is_visible(PG_FUNCTION_ARGS);
207208
Datumpg_ts_parser_is_visible(PG_FUNCTION_ARGS);
@@ -3897,6 +3898,17 @@ pg_opclass_is_visible(PG_FUNCTION_ARGS)
38973898
PG_RETURN_BOOL(OpclassIsVisible(oid));
38983899
}
38993900

3901+
Datum
3902+
pg_opfamily_is_visible(PG_FUNCTION_ARGS)
3903+
{
3904+
Oidoid=PG_GETARG_OID(0);
3905+
3906+
if (!SearchSysCacheExists1(OPFAMILYOID,ObjectIdGetDatum(oid)))
3907+
PG_RETURN_NULL();
3908+
3909+
PG_RETURN_BOOL(OpfamilyIsVisible(oid));
3910+
}
3911+
39003912
Datum
39013913
pg_collation_is_visible(PG_FUNCTION_ARGS)
39023914
{

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201107031
56+
#defineCATALOG_VERSION_NO201107171
5757

5858
#endif

‎src/include/catalog/pg_proc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,6 +2829,8 @@ DATA(insert OID = 2082 ( pg_operator_is_visiblePGNSP PGUID 12 1 0 0 0 f f f t
28292829
DESCR("is operator visible in search path?");
28302830
DATA(insertOID=2083 (pg_opclass_is_visiblePGNSPPGUID121000ffftfs1016"26"_null__null__null__null_pg_opclass_is_visible_null__null__null_ ));
28312831
DESCR("is opclass visible in search path?");
2832+
DATA(insertOID=3829 (pg_opfamily_is_visiblePGNSPPGUID121000ffftfs1016"26"_null__null__null__null_pg_opfamily_is_visible_null__null__null_ ));
2833+
DESCR("is opfamily visible in search path?");
28322834
DATA(insertOID=2093 (pg_conversion_is_visiblePGNSPPGUID121000ffftfs1016"26"_null__null__null__null_pg_conversion_is_visible_null__null__null_ ));
28332835
DESCR("is conversion visible in search path?");
28342836
DATA(insertOID=3756 (pg_ts_parser_is_visiblePGNSPPGUID121000ffftfs1016"26"_null__null__null__null_pg_ts_parser_is_visible_null__null__null_ ));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp