pg_is_other_temp_schema()

A function determining whether an OID is that of another session's temporary schema

pg_is_other_temp_schema() is a system function determining whether an OID represents another session's temporary schema.

pg_is_other_temp_schema() was added in PostgreSQL 8.2.

Usage

pg_is_other_temp_schema ( oid ) → boolean

Change history

Examples

Example of pg_is_other_temp_schema() usage:

postgres=# CREATE TEMPORARY TABLE foo (id INT);
CREATE TABLE

postgres=# SELECT pg_my_temp_schema(); -- this session's temporary schema OID
 pg_my_temp_schema 
-------------------
             24616
(1 row)

postgres=# \c - postgres
You are now connected to database "postgres" as user "postgres".
postgres=# SELECT pg_is_other_temp_schema(24616);
 pg_is_other_temp_schema 
-------------------------
 t
(1 row)

Categories

Schema (namespace), System function

See also

pg_my_temp_schema()