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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy