Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e20b1ea

Browse files
committed
Make get_extension_schema() available
This routine is able to retrieve the OID of the schema used with an extension (pg_extension.extnamespace), or InvalidOid if this information is not available. plpgsql_check embeds a copy of this code when performing checks on functions, as one out-of-core example. Author: Pavel Stehule Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/CAFj8pRD+9x55hjDoi285jCcjPc8uuY_D+FLn5RpXggdz+4O2sQ@mail.gmail.com
1 parent cf96907 commit e20b1ea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/backend/commands/extension.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ get_extension_name(Oid ext_oid)
222222
*
223223
* Returns InvalidOid if no such extension.
224224
*/
225-
static Oid
225+
Oid
226226
get_extension_schema(Oid ext_oid)
227227
{
228228
Oid result;

src/include/commands/extension.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *
4747

4848
extern Oid get_extension_oid(const char *extname, bool missing_ok);
4949
extern char *get_extension_name(Oid ext_oid);
50+
extern Oid get_extension_schema(Oid ext_oid);
5051
extern bool extension_file_exists(const char *extensionName);
5152

5253
extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema,

0 commit comments

Comments
 (0)