mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Add pg_opfamily_is_visible.
We already have similar functions for many other object types, including operator classes, so it seems like we should have this one, too. Extracted from a larger patch by Josh Kupershmidt
This commit is contained in:
parent
9473bb96d0
commit
b59d2fe497
@ -13109,6 +13109,12 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid);
|
||||
<entry><type>boolean</type></entry>
|
||||
<entry>is operator visible in search path</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_opfamily_is_visible(<parameter>opclass_oid</parameter>)</function></literal>
|
||||
</entry>
|
||||
<entry><type>boolean</type></entry>
|
||||
<entry>is operator family visible in search path</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_table_is_visible(<parameter>table_oid</parameter>)</function></literal>
|
||||
</entry>
|
||||
@ -13164,6 +13170,9 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid);
|
||||
<indexterm>
|
||||
<primary>pg_operator_is_visible</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>pg_opfamily_is_visible</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>pg_table_is_visible</primary>
|
||||
</indexterm>
|
||||
|
@ -202,6 +202,7 @@ Datum pg_type_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_function_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_operator_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_opclass_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_opfamily_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_collation_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_conversion_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_ts_parser_is_visible(PG_FUNCTION_ARGS);
|
||||
@ -3897,6 +3898,17 @@ pg_opclass_is_visible(PG_FUNCTION_ARGS)
|
||||
PG_RETURN_BOOL(OpclassIsVisible(oid));
|
||||
}
|
||||
|
||||
Datum
|
||||
pg_opfamily_is_visible(PG_FUNCTION_ARGS)
|
||||
{
|
||||
Oid oid = PG_GETARG_OID(0);
|
||||
|
||||
if (!SearchSysCacheExists1(OPFAMILYOID, ObjectIdGetDatum(oid)))
|
||||
PG_RETURN_NULL();
|
||||
|
||||
PG_RETURN_BOOL(OpfamilyIsVisible(oid));
|
||||
}
|
||||
|
||||
Datum
|
||||
pg_collation_is_visible(PG_FUNCTION_ARGS)
|
||||
{
|
||||
|
@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 201107031
|
||||
#define CATALOG_VERSION_NO 201107171
|
||||
|
||||
#endif
|
||||
|
@ -2829,6 +2829,8 @@ DATA(insert OID = 2082 ( pg_operator_is_visible PGNSP PGUID 12 1 0 0 0 f f f t
|
||||
DESCR("is operator visible in search path?");
|
||||
DATA(insert OID = 2083 ( pg_opclass_is_visible PGNSP PGUID 12 1 0 0 0 f f f t f s 1 0 16 "26" _null_ _null_ _null_ _null_ pg_opclass_is_visible _null_ _null_ _null_ ));
|
||||
DESCR("is opclass visible in search path?");
|
||||
DATA(insert OID = 3829 ( pg_opfamily_is_visible PGNSP PGUID 12 1 0 0 0 f f f t f s 1 0 16 "26" _null_ _null_ _null_ _null_ pg_opfamily_is_visible _null_ _null_ _null_ ));
|
||||
DESCR("is opfamily visible in search path?");
|
||||
DATA(insert OID = 2093 ( pg_conversion_is_visible PGNSP PGUID 12 1 0 0 0 f f f t f s 1 0 16 "26" _null_ _null_ _null_ _null_ pg_conversion_is_visible _null_ _null_ _null_ ));
|
||||
DESCR("is conversion visible in search path?");
|
||||
DATA(insert OID = 3756 ( pg_ts_parser_is_visible PGNSP PGUID 12 1 0 0 0 f f f t f s 1 0 16 "26" _null_ _null_ _null_ _null_ pg_ts_parser_is_visible _null_ _null_ _null_ ));
|
||||
|
Loading…
Reference in New Issue
Block a user