Remove a unnecessary argument from execute_extension_script()
Hi,
The attached patch is to remove a unnecessary argument "schemaOid"
from the static function execute_extension_script(). It might have
been intended to be used some way initially, but actually this is
not used since schemaName is sufficient.
Regards,
Yugo Nagata
--
Yugo Nagata <nagata@sraoss.co.jp>
Attachments:
extension_remove_unnecessary_arg.patchtext/x-diff; name=extension_remove_unnecessary_arg.patchDownload
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index ba540e3de5b..ec1d38b2172 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -982,7 +982,7 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
const char *from_version,
const char *version,
List *requiredSchemas,
- const char *schemaName, Oid schemaOid)
+ const char *schemaName)
{
bool switch_to_superuser = false;
char *filename;
@@ -1788,7 +1788,7 @@ CreateExtensionInternal(char *extensionName,
execute_extension_script(extensionOid, control,
NULL, versionName,
requiredSchemas,
- schemaName, schemaOid);
+ schemaName);
/*
* If additional update scripts have to be executed, apply the updates as
@@ -3380,7 +3380,7 @@ ApplyExtensionUpdates(Oid extensionOid,
execute_extension_script(extensionOid, control,
oldVersionName, versionName,
requiredSchemas,
- schemaName, schemaOid);
+ schemaName);
/*
* Update prior-version name and loop around. Since
On Thu, Feb 13, 2025 at 1:02 PM Yugo Nagata <nagata@sraoss.co.jp> wrote:
Hi,
The attached patch is to remove a unnecessary argument "schemaOid"
from the static function execute_extension_script(). It might have
been intended to be used some way initially, but actually this is
not used since schemaName is sufficient.
LGTM.
--
Fabrízio de Royes Mello
On Thu, Feb 13, 2025 at 03:18:51PM -0300, Fabrízio de Royes Mello wrote:
On Thu, Feb 13, 2025 at 1:02 PM Yugo Nagata <nagata@sraoss.co.jp> wrote:
The attached patch is to remove a unnecessary argument "schemaOid"
from the static function execute_extension_script(). It might have
been intended to be used some way initially, but actually this is
not used since schemaName is sufficient.LGTM.
Interesting. This parameter seems to have appeared between v30 [0]/messages/by-id/m24o8nhd69.fsf@2ndQuadrant.fr and v31
[1]: /messages/by-id/4171.1297135840@sss.pgh.pa.us
from a quick skim, I don't see any discussion about it. I'll plan on
committing this shortly.
[0]: /messages/by-id/m24o8nhd69.fsf@2ndQuadrant.fr
[1]: /messages/by-id/4171.1297135840@sss.pgh.pa.us
--
nathan