forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
69909: sql: implement pg_my_temp_schema and pg_is_other_temp_schema r=nvanbenschoten a=nvanbenschoten Needed for cockroachdb#69010. This PR adds a real implementation for the `pg_my_temp_schema` builtin function. `pg_my_temp_schema` returns the OID of session's temporary schema, or 0 if the session has not yet created a temporary schema. The PR then implements the `pg_is_other_temp_schema` builtin function. `pg_is_other_temp_schema` returns true if the given OID is the OID of another session's temporary schema. This can be useful, for example, to exclude other sessions' temporary tables from a catalog display. Release note (sql change): The pg_my_temp_schema builtin function now properly returns the OID of the active session's temporary schema, if one exists. Release note (sql change): The pg_is_other_temp_schema builtin function is now supported, which returns whether the given OID is the OID of another session's temporary schema. Release justification: None, waiting for v22.1. Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
- Loading branch information
Showing
8 changed files
with
244 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.