mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Add a couple of information functions to support direct checks on whether
a schema is our own temp schema or another backend's temp schema, and use these in place of some former kluges in information_schema. Per my proposal of yesterday.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.86 2006/07/14 14:52:17 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.87 2006/09/14 22:05:06 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -143,6 +143,8 @@ 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_conversion_is_visible(PG_FUNCTION_ARGS);
|
||||
Datum pg_my_temp_schema(PG_FUNCTION_ARGS);
|
||||
Datum pg_is_other_temp_schema(PG_FUNCTION_ARGS);
|
||||
|
||||
|
||||
/*
|
||||
@@ -2035,3 +2037,17 @@ pg_conversion_is_visible(PG_FUNCTION_ARGS)
|
||||
|
||||
PG_RETURN_BOOL(ConversionIsVisible(oid));
|
||||
}
|
||||
|
||||
Datum
|
||||
pg_my_temp_schema(PG_FUNCTION_ARGS)
|
||||
{
|
||||
PG_RETURN_OID(myTempNamespace);
|
||||
}
|
||||
|
||||
Datum
|
||||
pg_is_other_temp_schema(PG_FUNCTION_ARGS)
|
||||
{
|
||||
Oid oid = PG_GETARG_OID(0);
|
||||
|
||||
PG_RETURN_BOOL(isOtherTempNamespace(oid));
|
||||
}
|
||||
|
Reference in New Issue
Block a user