Overview

The pg_table_is_visible() is a schema visibility inquiry function that checks whether a specified table or other database object is visible in the current schema search path.

Syntax

The syntax for the pg_table_is_visible() function is as follows:

pg_table_is_visible(table_or_index_oid)

Parameters

The following parameters are required to run this function:

  • table_or_index_oid: specifies the object identifier (OID) of a table or it’s name

Examples

SELECT pg_table_is_visible(-1);
 pg_table_is_visible
----------------------------

SELECT pg_table_is_visible(16386);
 pg_table_is_visible
----------------------------
 t
SELECT pg_table_is_visible(16381);
 pg_table_is_visible
----------------------------
 f