Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15c1abd

Browse files
committed
Remove _PG_fini()
ab02d70 has removed from the backend the code able to support theunloading of modules, because this has never worked. This removes thelast references to _PG_fini(), that could be used as a callback formodules to manipulate the stack when unloading a library.The test module ldap_password_func had the idea to declare it, doingnothing. The function declaration in fmgr.h is gone.It was left around in 2022 to avoid breaking extension code, but at thisstage there are also benefits in letting extension developers know thatkeeping the unloading code is pointless and this move leads to lessmaintenance.Reviewed-by: Tom Lane, Heikki LinnakangasDiscussion:https://postgr.es/m/ZsQfi0AUJoMF6NSd@paquier.xyz
1 parent678a835 commit15c1abd

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

‎src/include/fmgr.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,14 +425,13 @@ extern int no_such_variable
425425

426426

427427
/*
428-
* Declare _PG_init/_PG_fini centrally. Historically each shared library had
429-
*its owndeclaration; but now that we want to mark these PGDLLEXPORT, using
430-
*centraldeclarations avoids each extension having to add that. Any
431-
*existingdeclarations in extensions will continue to work if fmgr.h is
432-
*includedbefore them, otherwise compilation for Windows will fail.
428+
* Declare _PG_init centrally. Historically each shared library had its own
429+
* declaration; but now that we want to mark these PGDLLEXPORT, using central
430+
* declarations avoids each extension having to add that. Any existing
431+
* declarations in extensions will continue to work if fmgr.h is included
432+
* before them, otherwise compilation for Windows will fail.
433433
*/
434434
externPGDLLEXPORTvoid_PG_init(void);
435-
externPGDLLEXPORTvoid_PG_fini(void);
436435

437436

438437
/*-------------------------------------------------------------------------

‎src/test/modules/ldap_password_func/ldap_password_func.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
PG_MODULE_MAGIC;
2424

2525
void_PG_init(void);
26-
void_PG_fini(void);
2726

2827
/* hook function */
2928
staticchar*rot13_passphrase(char*password);
@@ -37,12 +36,6 @@ _PG_init(void)
3736
ldap_password_hook=rot13_passphrase;
3837
}
3938

40-
void
41-
_PG_fini(void)
42-
{
43-
/* do nothing yet */
44-
}
45-
4639
staticchar*
4740
rot13_passphrase(char*pw)
4841
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp