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

Commit a05e607

Browse files
author
Commitfest Bot
committed
[CF 5735] v1 - SQL function to access to creating_extension
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5735 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAG=VW17kAweKGwqtVU8vn71uRCOS9yxnyEnoa=-3sAuyZt5O6g@mail.gmail.com Author(s): Yurii Rashkovskii
2 parents f3622b6 + cee31da commit a05e607

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/backend/commands/extension.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3906,3 +3906,13 @@ find_in_paths(const char *basename, List *paths)
39063906

39073907
return NULL;
39083908
}
3909+
3910+
Datum
3911+
pg_creating_extension(PG_FUNCTION_ARGS)
3912+
{
3913+
if (creating_extension)
3914+
{
3915+
PG_RETURN_OID(CurrentExtensionObject);
3916+
}
3917+
PG_RETURN_NULL();
3918+
}

src/include/catalog/pg_proc.dat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10727,6 +10727,11 @@
1072710727
proname => 'pg_extension_config_dump', provolatile => 'v', proparallel => 'u',
1072810728
prorettype => 'void', proargtypes => 'regclass text',
1072910729
prosrc => 'pg_extension_config_dump' },
10730+
{ oid => '3814',
10731+
descr => 'determine if an extension is currently being created',
10732+
proname => 'pg_creating_extension', provolatile => 'v', proparallel => 'u',
10733+
prorettype => 'oid', proargtypes => '',
10734+
prosrc => 'pg_creating_extension' },
1073010735

1073110736
# SQL-spec window functions
1073210737
{ oid => '3100', descr => 'row number within partition',

0 commit comments

Comments
 (0)